-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby-plugin-netlify-cms]: Breaks Gatsby develop
and build
#4031
Comments
Hi, this is known error in recently released netlify-cms 1.2.0, see this issue: |
Oh thats great, thanks for sharing that link. Let's keep this opened until we release |
(I will warn that this is somewhat speculation, I haven't dug too deeply.) Tracing the error back to Acorn and WebPack, it looks like WebPack version 1, which Gatsby is using, has the Acorn parser set to parse ES6 and lower (webpack/lib/Parser.js#v1.15.0). This is why the Gatsby WebPack loader cannot parse the Netlify CMS unless we transpile anything newer than ES6. (The latest version of WebPack supports parsing up to ES2017 and lower (webpack/lib/Parser.js#master), but Gatsby isn't using it.) |
@tech4him1 Your hypothesis seems right on point with what I was finding in my tests. |
@tech4him1 @talves I've read somewhere that Webpack version upgrade is planned for Gatsby v2 by @KyleAMathews ... still a solution for Gatsby v1 is needed I think. |
@pogo19 Yes, @erquhart linked to v2 in #2641. I do agree that a solution is needed to the current (v1) Gatsby. I'm hoping there is an alternative way than making the CMS transpile it, though. @erquhart @KyleAMathews Is there a reason why the |
It's mentioned on decaporg/decap-cms#1097 that the temp fix is to revert to However, as Is there a temp workaround? |
@peduarte If you are using yarn, you can use this in your
...and then delete your |
@pogo19 awesome, thank you! 🙏 |
@pogo19 Using the work around the Unfortunately the cms is still broken. Uploading media files or submit fails. An image file upload fails with the below error ...
|
@Jaikant If you think it is an error in Netlify CMS, please report the issue in Netlify CMS Github. |
Is it worth pushing a new release of |
That won't be necessary, I'm working on a fix for this right now. Stay tuned. |
Fixed in netlify-cms 1.2.2. |
@peduarte can you try it now and close this if things are working? |
@erquhart sure, will do! |
@peduarte you may have to |
Beautiful, great work everyone 🎉 |
I just started a new project using 'gatsby-plugin-netlify-cms', and I'm still not able to build my CSS Module if the plugin is active, 'gatsby develop' works fine 'gatsby build' output an error :
The only way to get my build to work is by removing gatsby-plugin-netlify-cms. |
Hey Tom! Do you have the newest versions? What are the used versions of plugin and of its dependency to |
It was a fresh install of Gatsby, using Gatsby new command and fresh install of all plugins...
I tried your solution, but still not working even with Netlify-cms 1.3
|
@TomPichaud are you using css modules? |
Simple test using CSS Modules, https://github.com/TomPichaud/test-cms-plugin But |
Alright I think I know what's going on, I'll take a swing at it in the morning. |
Thanks for having a look, I hope this will be resolved soon. Should we reopen the issue or create a new one ? |
@TomPichaud creating a new one would be great. |
Hello 👋
I've noticed that by adding the latest
gatsby-plugin-netlify-cms
plugin,gatby develop
andgatsby build
stop working.I've done a few tests and isolated the issue down to this plugin. If I remove it, everything works again.
Below are the errors I'm getting:
gatsby develop
gatsby build
package.json
I've tried downgrading the version of all packages, but not luck. The only way to get my build to work again is by removing
gatsby-plugin-netlify-cms
.Appreciate any guidance, thanks! 👍
The text was updated successfully, but these errors were encountered: