Failed to compile, unexpected character '#'
See original GitHub issueI’ve been trying to get this to work for a while now but, unfortunately, I haven’t had the luck. Firstly, the directory structure looks like this:
├── docs
│ └── res.mdx
├── node_modules
│ ├── bloomer
│ ├── classnames
│ └── tslib
├── package.json
└── package-lock.json
I cd to this directory and run mdx-go docs
and get the following error:
➜ mdx-go docs
[mdx-go] starting dev server...
✔ success [mdx-go] compiled in 1s 848ms
ERROR Failed to compile with 1 errors 19:30:57
error in /home/karan/.nvm/versions/node/v8.11.4/lib/node_modules/mdx-go/lib/client/keyboard-shortcuts.md
Module parse failed: Unexpected character '#' (2:0)
You may need an appropriate loader to handle this file type.
|
> ### Keyboard Shortcuts
|
| - `/`: Show directory listing
@ /home/karan/.nvm/versions/node/v8.11.4/lib/node_modules/mdx-go/lib/client/routes.js 11:0-56 44:26-43
@ /home/karan/.nvm/versions/node/v8.11.4/lib/node_modules/mdx-go/lib/client/App.js
@ /home/karan/.nvm/versions/node/v8.11.4/lib/node_modules/mdx-go/lib/client/index.js
@ multi webpack-hot-middleware/client /home/karan/.nvm/versions/node/v8.11.4/lib/node_modules/mdx-go/lib/client/index.js
✖ 「wdm」:
ERROR in ./client/keyboard-shortcuts.md 2:0
Module parse failed: Unexpected character '#' (2:0)
You may need an appropriate loader to handle this file type.
|
> ### Keyboard Shortcuts
|
| - `/`: Show directory listing
@ ./client/routes.js 11:0-56 44:26-43
@ ./client/App.js
@ ./client/index.js
@ multi webpack-hot-middleware/client ./client/index.js
[mdx-go] listening on http://localhost:8080
^C
Any idea why it’s breaking due to a file that isn’t even present in the directory? Is there something wrong on my end that I need to change? Please do let me know.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Unexpected character, when importing or accessing docx file ...
Failed to compile Module parse failed: Unexpected character, when importing or accessing docx file reactjs.
Read more >Error Module parse failed: Unexpected character '
Hello, I get errors when I comple with webpack. ERROR in ./node_modules/vx-easyui/dist/themes/icons/filesave.png 1:0. Module parse failed: ...
Read more >Can't build with webpack - Material Design for Bootstrap
css 1:0 Module parse failed: Unexpected character '@' (1:0) You may need an appropriate loader to handle this file type, currently no loaders...
Read more >Module parse failed: Unexpected character '@' (1:0) with ...
Coding example for the question Module parse failed: Unexpected character '@' (1:0) with Storybook 6.1.11, Webpack 5.11.0, React 17.0.1-Reactjs.
Read more >Fontsource Error - Unexpected character '@' - Roots Discourse
build.rules.css.setInclude([app.path()]);. Try to load modules from the source directory or the node_modules ...
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
Thanks! That’s definitely a bug. I think I have a fix in #20 if you wanna try installing the latest version
The issue keeps happening: