cheerio upgrade problem
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.
yes same problem, pls fix it asap.
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.
I tried with fixed version "cheerio":"1.0.0-rc.12" worked for me
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.
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.
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';
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'
This is also breaking bundling of react native projects: https://github.com/cheeriojs/cheerio/issues/4032
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'
I tried with fixed version "cheerio":"1.0.0-rc.12" worked for me
worked for me
Closing as this won't be relevant anymore. Sorry for the additional work!
pls fix problem Render : SyntaxError: The requested module 'cheerio' does not provide an export named 'default' at ModuleJob._instantiate (node:internal/modules/esm/module_job:175:21) at async ModuleJob.run (node:internal/modules/esm/module_job:258:5) at async ModuleLoader.import (node:internal/modules/esm/loader:540:24) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)