After the release of `v1.0.0-rc.11`, `Module parse failed: Unexpected token` occurs
See original GitHub issueAs the title says, since v1.0.0-rc.11
the below error occurs:
START:
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
✖ 「wdm」:
ERROR in ./node_modules/htmlparser2/lib/esm/index.js 59:9
Module parse failed: Unexpected token (59:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| return getFeed(parseDOM(feed, options));
| }
> export * as DomUtils from "domutils";
| // Old name for DomHandler
| export { DomHandler as DefaultHandler };
@ ./node_modules/cheerio/lib/esm/index.js 11:0-68
@ ./node_modules/enzyme/build/ReactWrapper.js
@ ./node_modules/enzyme/build/index.js
@ ./test.entry.js
I think it’s a bug of cheerio
, because it has been occurring since 3 days ago when the v1.0.0-rc.11
released.
Could you please look into this bug?
Issue Analytics
- State:
- Created a year ago
- Reactions:18
- Comments:26 (4 by maintainers)
Top Results From Across the Web
Webpack React error: Module parse failed: Unexpected token
But when I try to create a dist file there is an error. How to fix that? enter image description here. From package.json...
Read more >htmlparser2 unexpected token - You.com | The AI Search ...
Module parse failed: Unexpected token - Stack Overflow ... 1 Answer. Apparently it happened because you have two module properties in the webpack...
Read more >[Help] Module parse failed: Unexpected token . Babel not ...
My babel.config.js stays the same with 6433 and not using .babelrc. I found .flowconfig was removed from master branch. Is it relevant ?...
Read more >Build error with @arcgis/core and Angular 11: "Module parse ...
Just chiming in, am getting similar "unexpected token" errors after bumping to v4.24. Had been pinned at v4.22 due to changes to the...
Read more >App.vue “Module parse failed: Unexpected token (1:0)” - MSDN
User1993186009 posted. Summary of the problem I am having: Hi,. I am facing the following issue while running ASPNET.
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
People might not be able to upgrade a library, if that’s actually brought in by other modules (e.g. via create-react-app). Changes that require upgrades of other libraries should always be accompanied by at least a minor version increase.
Locking package import to cheerio@1.0.0-rc.10 fixed the issue for me. But that should really not be needed! Please do such changes in another release that raise at least the minor version number, so they are not automatically picked up.
I resolved this problem by declaring
cheerio
indevDependencies
like:Hope this helps.