-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Breaking: gatsby-plugin-netlify-cms
broken since #765.
#1097
Comments
What was broken? |
@talves and @pogo19 were able to reproduce it, but I can't. From Gitter (https://gitter.im/netlify/NetlifyCMS?at=5a7f00dfce68c3bc746c5972):
|
For me the problem was present when trying to use netlify-cms (master branch build) in Gatsby using gatsby-plugin-netlify-cms |
@pogo19 I pulled your repo and tried to run it -- it builds fine for me with the |
@pogo19 Also, can you try the |
@tech4him1 Will try tomorrow .... also please note that operations like |
Good point -- I've been using |
To reproduce:
I will confirm this as an issue again this morning. |
Sorry, I haven't got to it earlier. I've just opened my notebook, been on the road all day. Thanks @talves |
Was it failing with both the |
@tech4him1 Yes; It was failing on current master, so testing against the @pogo19 No problem. Hopefully we can figure out how to handle this. |
Interesting, I'm not seeing the JS building error at all. I do get an error during the "HTML build" if I install it like @talves mentioned above, but using @talves @pogo19 The one possible difference that I see possible between your setup and mine is that you are using |
@tech4him1 For me |
Is this the same error that you guys have been getting? It doesn't look like it to me. Expand Error
|
@erquhart @Benaiah @AustinGreen Can you reproduce this? (steps in #1097 (comment)) |
Yes, I get this one too now. But build against 1.1.0 from npm registry works. |
@pogo19 Ah, so you're not getting the original error anymore? |
@tech4him1 I haven't tried in my project since yesterday. This error I get from the @talves reproduce steps. |
@tech4him1 In my project I still get my original error.
|
Just installed this project today for the first time and I am also getting the same error. Error: ./~/netlify-cms/dist/cms.js
Module parse failed: /Users/carl-dev/Developer/websites-live/pa-blog/node_modules/netlify-cms/dist/cms.js Unexpected token (174:70542)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (174:70542)
at Parser.pp$4.raise (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp.unexpected (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:603:10)
at Parser.pp.semicolon (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:581:61)
at Parser.pp$1.parseReturnStatement (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:839:57)
at Parser.pp$1.parseStatement (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:699:34)
at Parser.pp$1.parseBlock (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:981:25)
at Parser.pp$3.parseFunctionBody (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:2105:24)
at Parser.pp$1.parseFunction (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:1065:10)
at Parser.pp$1.parseFunctionStatement (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:818:17)
at Parser.pp$1.parseStatement (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:694:19)
at Parser.pp$1.parseBlock (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:981:25)
at Parser.pp$3.parseFunctionBody (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:2105:24)
at Parser.pp$1.parseFunction (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:1065:10)
at Parser.pp$3.parseExprAtom (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:1810:19)
at Parser.pp$3.parseExprSubscripts (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:1715:21)
at Parser.pp$3.parseMaybeUnary (/Users/carl-dev/Developer/websites-live/pa-blog/node_modules/acorn/dist/acorn.js:1692:19)
@ ./src/cms/cms.js 3:18-40 |
gatsby-plugin-netlify-cms
broken since #765.gatsby-plugin-netlify-cms
broken since #765.
Shawn released 1.2.0 today and it produced the error others are seeing. These confirm the errors I was getting on a master branch build using my test case above.
My suspicion is that Gatsby is re-bundling the cms from our bundle and it is causing errors on that build. cc/ @tech4him1 , @erquhart |
@tech4him1 I understand it will convert everything. It only increased the 1.6M file by 40k, so I was curious why it was such a small increase. |
For the record, the problem was that Gatsby couldn't handle untranspiled JS (above ES5). WebPack v1 could only parse up to ES6 (gatsbyjs/gatsby#4031 (comment)) and UglifyJS v2 can only parse up to ES5. We started transpiling our code back to ES5 again to fix this, and this was released as v1.2.2 of the CMS. |
gatsby-plugin-netlify-cms
seems to be broken on the CMS master since #765 was merged (i.e. >=1.2.0).NOTE: A temporary fix is to revert to v1.1.0.
The text was updated successfully, but these errors were encountered: