-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Module parse failed: Unexpected token (473:30) #596
Comments
Definitely getting the same issue. I can share my project. |
I can tell you @pedronauck exactly where the problem is: The incompatibility lies with an upgrade of diff --git b/package-lock.json a/package-lock.json
index f0a5074..054340d 100644
--- b/package-lock.json
+++ a/package-lock.json
@@ -1787,10 +1787,13 @@
"dev": true
},
"acorn-dynamic-import": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz",
- "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==",
- "dev": true
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz",
+ "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==",
+ "dev": true,
+ "requires": {
+ "acorn": "^5.0.0"
+ }
},
"acorn-globals": {
"version": "4.3.0",
@@ -16621,17 +16624,17 @@
"dev": true
},
"webpack": {
- "version": "4.29.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.0.tgz",
- "integrity": "sha512-pxdGG0keDBtamE1mNvT5zyBdx+7wkh6mh7uzMOo/uRQ/fhsdj5FXkh/j5mapzs060forql1oXqXN9HJGju+y7w==",
+ "version": "4.28.4",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.28.4.tgz",
+ "integrity": "sha512-NxjD61WsK/a3JIdwWjtIpimmvE6UrRi3yG54/74Hk9rwNj5FPkA4DJCf1z4ByDWLkvZhTZE+P3C/eh6UD5lDcw==",
"dev": true,
"requires": {
"@webassemblyjs/ast": "1.7.11",
"@webassemblyjs/helper-module-context": "1.7.11",
"@webassemblyjs/wasm-edit": "1.7.11",
"@webassemblyjs/wasm-parser": "1.7.11",
- "acorn": "^6.0.5",
- "acorn-dynamic-import": "^4.0.0",
+ "acorn": "^5.6.2",
+ "acorn-dynamic-import": "^3.0.0",
"ajv": "^6.1.0",
"ajv-keywords": "^3.1.0",
"chrome-trace-event": "^1.0.0",
@@ -16652,12 +16655,6 @@
"webpack-sources": "^1.3.0"
},
"dependencies": {
- "acorn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz",
- "integrity": "sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==",
- "dev": true
- },
"schema-utils": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", |
If someone is stuck on this, and following @dfee's hints, this seems to fix it:
|
Thanks @dfee, this is already fixed on |
npm install docz@latest now default to 0.13.7, please release 0.14 to resolve this problem in latest version. |
fyi pedro is currently sick and will get back to this in a few days (i dont speak for him but just relaying the info) |
1 similar comment
fyi pedro is currently sick and will get back to this in a few days (i dont speak for him but just relaying the info) |
Thanks, waiting v0.14 |
+1 here. mentionned trick works but as it's on our CI that this fails it really hurts to put this hack as a step in the build :( |
when will v0.14 be released? |
hi @dfee and everyone here with webpack issues turns out webpack 4.29 has had some wacky npm dependency issues i dont fully understand. just saw this in an unrelated project i'm helping out on as well: react-static/react-static#1027 (comment) its a mess. use yarn as much as possible. |
We are facing this issue :( |
Same here |
Same here. |
@bichotll I think they mean you need to update the version inside |
@mattietea oh! thanks for the heads up! 👍 |
|
Thanks a lot for your help. It looks like everything works with Yarn, and the problem appears only with NPM and the WebPack issue. I have an empty project for testing with only a |
@timbergus I had the same issue, it gets solve if you lock |
The Oh, apologies for being such a noob.. It's my first hour of using docz :) |
Docz is using |
Just got the same problem on a fresh installation. For me, the issue got solved by creating the project again with Yarn. npm installation failed with the error similar to what @ohardy posted. Reproduction of an error:
Reproduction of a success:
Full error:
Versions:
Hope this might help in some way. |
Note: reads mdx files, not md. docz-core dependency needs specific webpack version: doczjs/docz#596 (comment) `cd node_modules/docz-core && npm i -D [email protected] && cd .. && cd ..` Then run `npm run docz:build`, `npm run docz:dev`. Signed-off-by: Jackie Wijaya <[email protected]>
@pedronauck to answer your question, I'm still having this issue on rc7 with webpack 4.29.6. Npm support is sadly a must for my organization, otherwise the workaround above does work. |
Closed in favor of #704, the answer is there. |
Bug Report
Clean install of last version of docz. When I run docz dev, I got:
I can't share a project link.
I check webpack aliases with:
and
~imports
is present.Thanks in advance
The text was updated successfully, but these errors were encountered: