v1.0.0-rc.* Compiled with errors: Module parse failed: Unexpected token
See original GitHub issueBug Report
Describe the bug
When I try to run docz dev
I get multiple errors regarding an appropriate loader
✖ Docz
Compiled with some errors in 29.12s
ERROR Failed to compile with 3 errors 12:00:39 PM
error in ./node_modules/docz/dist/index.esm.js
Module parse failed: Unexpected token (15:38)
You may need an appropriate loader to handle this file type.
| import { MDXProvider } from '@mdx-js/tag';
|
> const BasePlayground = loadable(() => import('./chunk.esm2.js'));
| const Playground = props => typeof window !== 'undefined' ? (createElement(Suspense, { fallback: null },
| createElement(BasePlayground, Object.assign({}, props)))) : null;
@ ./.docz/app/root.jsx 9:0-59 17:2-15 20:19-23 27:25-31
@ ./.docz/app/index.jsx
@ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./.docz/app/index.jsx
error in ./node_modules/docz-theme-default/dist/index.esm.js
Module parse failed: Unexpected token (245:30)
You may need an appropriate loader to handle this file type.
| `;
|
> const CodeMirror = lazy(() => import('./chunk.esm2.js'));
| const getLanguage = (children) => {
| const defaultLanguage = 'jsx';
@ ./.docz/app/root.jsx 11:0-39 18:29-34
@ ./.docz/app/index.jsx
@ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./.docz/app/index.jsx
error in ./.docz/app/imports.js
Module parse failed: Unexpected token (8:11)
You may need an appropriate loader to handle this file type.
| export var imports = {
| 'src/index.mdx': function srcIndexMdx() {
> return import(
| /* webpackPrefetch: true, webpackChunkName: "src-index" */
| 'src/index.mdx');
@ ./.docz/app/root.jsx 12:0-36 28:13-20
@ ./.docz/app/index.jsx
@ multi ./node_modules/react-dev-utils/webpackHotDevClient.js ./.docz/app/index.jsx
Environment
- node v10.15.1
- npm v6.8.0
- react v16.8.4
- npm ls webpack ├─┬ docz@1.0.0-rc.3 │ └─┬ docz-core@1.0.0-rc.3 │ └── webpack@4.29.6 └─┬ react-scripts@2.1.8 └── webpack@4.28.3
Additional context/Screenshots
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:35 (6 by maintainers)
Top Results From Across the Web
Module parse failed: Unexpected token (257:106) You may ...
After running 'npm update' on my app, I am suddenly getting the following error: Compiled with problems: ERROR in ./node_modules/pako/lib/zlib/ ...
Read more >Odyssey Lift-off I: "Module parse failed: Unexpected token" Error
I am receiving this error message: Failed to compile. ./src/pages/tracks.js 43:10. Module parse failed: Unexpected token (43:10)
Read more >App.vue “Module parse failed: Unexpected token (1:0)” - MSDN
ERROR in ./src/App.vue 1:0. Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type.
Read more >Storybook error - "ModuleParseError: Module parse failed
It seems that after that, I started getting the following error when I ... [built] ModuleParseError: Module parse failed: Unexpected token ...
Read more >Webpack build error - Questions - Babylon.js Forum
Failed to compile. ./node_modules/@babylonjs/core/Misc/environmentTextureTools.js 100:39 Module parse failed: Unexpected token (100:39) File ...
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
Also instead of installing
webpack@4.28.2
, you can specify it inresolutions
inpackage.json
No need to add those comments, the maintainer is doing a great job and does not deserve comments like that.