Skip to content
This repository has been archived by the owner on Feb 13, 2025. It is now read-only.

打包报错 ReferenceError: ReadableStream is not defined #76

Open
qjwsmile opened this issue Aug 12, 2024 · 7 comments
Open

打包报错 ReferenceError: ReadableStream is not defined #76

qjwsmile opened this issue Aug 12, 2024 · 7 comments

Comments

@qjwsmile
Copy link

"vite-plugin-qiankun": "1.0.15" 这个版本已经用了一年多,今天突然打包时报错报错原因是引用了undici ,我发现是包里引用了cheerio库 "cheerio": "^1.0.0-rc.10" ,cheerio 3天前更新了最新版本1.0.0之后。就出现该问题

@aceHubert
Copy link

cheerio 1.0.0 必要node 18+以上

@qjwsmile
Copy link
Author

cheerio 1.0.0 必要node 18+以上

是这样的,但是在vite-plugin-qiankun 的1.0.5项目里用的cheerio是 "cheerio": "^1.0.0-rc.10",3天前cheerio升级了1.0.0导致的该问题。我现在已经解决了 在项目里指定 "cheerio": "^1.0.0-rc.12" 就可以了,cheerio : 1.0.0 node版本不够会有问题

@findfirecode
Copy link

cheerio 1.0.0 必要node 18+以上

是这样的,但是在vite-plugin-qiankun 的1.0.5项目里用的cheerio是 "cheerio": "^1.0.0-rc.10",3天前cheerio升级了1.0.0导致的该问题。我现在已经解决了 在项目里指定 "cheerio": "^1.0.0-rc.12" 就可以了,cheerio : 1.0.0 node版本不够会有问题

你好, 是固定yarn.lock吗, 遇到同样问题, 请问具体怎么操作的

@qjwsmile
Copy link
Author

cheerio 1.0.0 必要node 18+以上

是这样的,但是在vite-plugin-qiankun 的1.0.5项目里用的cheerio是 "cheerio": "^1.0.0-rc.10",3天前cheerio升级了1.0.0导致的该问题。我现在已经解决了 在项目里指定 "cheerio": "^1.0.0-rc.12" 就可以了,cheerio : 1.0.0 node版本不够会有问题

你好, 是固定yarn.lock吗, 遇到同样问题, 请问具体怎么操作的

需要指定cheerio版本,在package.json 添加 resolutions 字段,指定 cheerio 的版本:"resolutions": {
"cheerio": "1.0.0-rc.12"
} resolutions是和 dependencies同级的
我用的是1.0.0-rc.12版本就可以了,你试试 还是不行的话你在回复我 。我帮你看看

@findfirecode
Copy link

cheerio 1.0.0 必要node 18+以上

是这样的,但是在vite-plugin-qiankun 的1.0.5项目里用的cheerio是 "cheerio": "^1.0.0-rc.10",3天前cheerio升级了1.0.0导致的该问题。我现在已经解决了 在项目里指定 "cheerio": "^1.0.0-rc.12" 就可以了,cheerio : 1.0.0 node版本不够会有问题

你好, 是固定yarn.lock吗, 遇到同样问题, 请问具体怎么操作的

需要指定cheerio版本,在package.json 添加 resolutions 字段,指定 cheerio 的版本:"resolutions": { "cheerio": "1.0.0-rc.12" } resolutions是和 dependencies同级的 我用的是1.0.0-rc.12版本就可以了,你试试 还是不行的话你在回复我 。我帮你看看

已经解决了, 感谢

@yufeiant
Copy link

怎么解决的呢?

@qjwsmile
Copy link
Author

怎么解决的呢?

需要指定cheerio版本,在package.json 添加 resolutions 字段,指定 cheerio 的版本:"resolutions": {
"cheerio": "1.0.0-rc.12"
} resolutions是和 dependencies同级的
我用的是1.0.0-rc.12版本就可以了,你试试

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

No branches or pull requests

4 participants