Skip to content
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

[Bug] You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file #8109

Closed
Pentium286 opened this issue May 21, 2022 · 5 comments

Comments

@Pentium286
Copy link

What happens?

> [email protected] start
> cross-env PORT=8099 umi dev

🚀 Starting Umi UI using [email protected]...
⛽️ Ready on http://localhost:3000/
Building dll...

✖ Webpack
  Compiled with some errors in 2.28s

 ERROR  Failed to compile with 2 errors                                                                                   13:49:33

 error  in ./node_modules/htmlparser2/lib/esm/index.js

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 13:6-26
 @ ./node_modules/enzyme/build/Utils.js
 @ ./node_modules/enzyme/build/ReactWrapper.js
 @ ./node_modules/enzyme/build/index.js
 @ dll umi

 error  in ./node_modules/parse5/dist/index.js

Module parse failed: Unexpected token (6: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
| export { serialize, serializeOuter } from './serializer/index.js';
| /** @internal */
> export * as foreignContent from './common/foreign-content.js';
| /** @internal */
| export * as html from './common/html.js';

 @ ./node_modules/cheerio/lib/esm/parsers/parse5-adapter.js 2:0-79 22:10-23 23:10-23 48:18-32
 @ ./node_modules/cheerio/lib/esm/index.js
 @ ./node_modules/enzyme/build/Utils.js
 @ ./node_modules/enzyme/build/ReactWrapper.js
 @ ./node_modules/enzyme/build/index.js
 @ dll umi

Mini Showcase Repository(REQUIRED)

Please provide a repository using yarn create @umijs/umi-app then upload to your GitHub 请提供一个可复现的仓库,使用 yarn create @umijs/umi-app 创建,并上传到你的 GitHub 仓库

How To Reproduce

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

npm run start

Context

  • Umi Version:2.13.17
  • Node Version:v16.15.0
  • Platform: macOS
@ygnoh
Copy link

ygnoh commented May 23, 2022

@qian-zs I have the same issue. Did you figure it out?

@Pentium286
Copy link
Author

@qian-zs I have the same issue. Did you figure it out?

我问别人要了package-lock.json安装一下就行了,应该是某些依赖跟新导致的

@ygnoh
Copy link

ygnoh commented May 23, 2022

@qian-zs FYI, I think it's a bug of https://github.com/cheeriojs/cheerio. So I reported cheeriojs/cheerio#2545.

@abdullah-336
Copy link

I have the same issue. Did anyone figure it out?

@simioni
Copy link

simioni commented Aug 25, 2022

Same issue after updating:

- "cheerio": "^1.0.0-rc.3"
+ "cheerio": "^1.0.0-rc.12"

Reverting back to rc.3 fixed the issue:

npm i [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants