Module parse failed: Unexpected token (473:30)
See original GitHub issueBug Report
Clean install of last version of docz. When I run docz dev, I got:
./node_modules/docz/dist/index.m.js 473:30
Module parse failed: Unexpected token (473:30)
You may need an appropriate loader to handle this file type.
| async function loadFromImports(path) {
| // tslint:disable-next-line
> const { imports } = await import('~imports');
| const { default: Component$$1, getInitialData } = await imports[path]();
| const ExportedComponent = props => (createElement(AsyncComponent, Object.assign({}, props, { as: Component$$1 || 'div', getInitialData: getInitialData })));
@ ./node_modules/docz-theme-default/dist/index.m.js 39:0-72 243:12-16 374:35-39 466:34-45 467:8-12 511:25-29 552:50-54 640:16-27 643:41-45 942:20-24 1024:28-39 1098:16-27 1490:33-44 1601:16-27 1872:16-27 1935:29-40 2029:45-56 2040:25-36 2041:8-18 2073:16-21
@ ./.docz/app/root.jsx
@ ./.docz/app/index.jsx
@ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./node_modules/@babel/polyfill/lib/index.js ./.docz/app/index.jsx
I can’t share a project link.
I check webpack aliases with:
modifyBundlerConfig : (config) => {
console.log(config.resolve.alias);
return config;
}),
and ~imports
is present.
Thanks in advance
Issue Analytics
- State:
- Created 5 years ago
- Reactions:22
- Comments:24 (6 by maintainers)
Top Results From Across the Web
Module parse failed: Unexpected token. You may ... - GitHub
This is a library build issue. We moved to ts3.8 without thinking about optional chaining transpiling. Here seems like a correct way to...
Read more >Module parse failed: Unexpected Token. You may need an ...
The error comes from this line: return <h1>React App</h1> , because <h1>...</h1> is not valid javascript. Even if rename this is would be ......
Read more >Odyssey Lift-off I: "Module parse failed: Unexpected token" Error
Hello, I am on the “useQuery hook” step attempting to implement the grid. Here is my code that I think is problematic: const...
Read more >Module parse failed: Unexpected token Emberjs - Build Issues
I currently have an issue in an addon which I'm trying to convert to an Emberjs addon to the V2 version. It's a...
Read more >Module parse failed: Unexpected token - Expo SDK - Forums
Hello, I have been trying to make a PWA file from my currently working app, but I keep getting the same error in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If someone is stuck on this, and following @dfee’s hints, this seems to fix it:
npm i -D webpack@4.28.4
I can tell you @pedronauck exactly where the problem is:
The incompatibility lies with an upgrade of
webpack@4.28.4
->webpack@4.29.0
.