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

cheerio upgrade problem #4024

Open
wghule opened this issue Aug 14, 2024 · 9 comments
Open

cheerio upgrade problem #4024

wghule opened this issue Aug 14, 2024 · 9 comments

Comments

@wghule
Copy link

wghule commented Aug 14, 2024

cheerio 1.0.0 is not supported for below node 18. for this case, can you upgrade cheerio the major version,such as 2.0.0?It causes automatic upgrade issues for existing projects.

@LiangZuoting
Copy link

yes same problem, pls fix it asap.

@YozoraNoTenshi
Copy link

YozoraNoTenshi commented Aug 14, 2024

I have the same problem. Is there any workaround for this?

  • I tried to manually install a specific older version without the node 18 restriction but it didn't work.

@linojjoy
Copy link

I tried with fixed version "cheerio":"1.0.0-rc.12" worked for me

@cossssmin
Copy link

Releasing breaking changes from an RC means that one of our dependencies that was using rc12 now automatically installs 1.0.0, breaking the app for everyone not using Node 18. This was unexpected from an RC where the API should be stable and no breaking changes should be introduced.

@Daviddube
Copy link

I am also running into this issue through an enzyme dependency. cheerio-1.0.0-rc.12 works but cheerio-1.0.0 fails. It looks like it's because parse5-parser-stream is not compatible with older node versions.

@jxustchenyong
Copy link

ci/cd auto upgrade to 1.0.0, then bring this problem, I use node 16 and typescript 4.9.5, downgrade to cheerio":"1.0.0-rc.12, then fixed
node_modules/cheerio/dist/commonjs/index.d.ts:7:1 - error TS1383: Only named exports may use 'export type'.
7 export type * from './types.js';

@ichbinstudent
Copy link

This also bricked @iconify

|- file:///./node_modules/@iconify/tools/lib/svg/index.mjs:1
import cheerio from 'cheerio';
       ^^^^^^^
SyntaxError: The requested module 'cheerio' does not provide an export named 'default'

@UNIDY2002
Copy link

This is also breaking bundling of react native projects: #4032

@JosueRodriguezExio
Copy link

JosueRodriguezExio commented Aug 19, 2024

Same error here, using vite build custom script in pnpm:

/node_modules/.pnpm/[email protected]/node_modules/i18next-parser/dist/lexers/html-lexer.js:2
import cheerio from 'cheerio';var
^^^^^^^
SyntaxError: The requested module 'cheerio' does not provide an export named 'default'

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

No branches or pull requests

10 participants