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

vite开发环境运行会报错 #10

Open
ll60 opened this issue Sep 13, 2022 · 2 comments
Open

vite开发环境运行会报错 #10

ll60 opened this issue Sep 13, 2022 · 2 comments

Comments

@ll60
Copy link

ll60 commented Sep 13, 2022

在dev模式下,会报下面的错误。但是在预览环境或者打包正式环境不会出现问题,请问有遇到过吗

vue-router.mjs:3441 Error: Module "stream" has been externalized for browser compatibility. Cannot access "stream.Readable" in client code.
at Object.get (browser-external:stream:9:13)
at make_xlsx_lib (xlsx.min.js:2:424100)
at node_modules/.pnpm/[email protected]/node_modules/xlsx-js-style/dist/xlsx.min.js (xlsx.min.js:2:424157)
at __require2 (chunk-NKHIPFFU.js?v=2d1bd263:15:50)
at dep:xlsx-js-style:1:16

@ll60
Copy link
Author

ll60 commented Sep 14, 2022

没有问题了,vite3.1更新了这个问题,错误成都降低为警告了。

@stalkercn
Copy link

SheetJS#2744
xlsx-js solved this problem by adding exports fields to package.json. @ll60

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

2 participants