I get "unable to resolve module 'stream' when I try to use jszip in an Expo app.Expo is a javascript only version of React Native.
I am getting this too:
ERROR in ./node_modules/jszip/lib/readable-stream-browser.js
Module not found: Error: Can't resolve 'stream'
I don't think it's related to a specific ui/js framework, as I am using angular6/devextreme while getting this error.
I expect it to be a problem with webpack 4 bundling maybe, as the error occures after upgrading from angular5 to angular6 which is using webpack 4.
Yes, having the same issue when building for angular6.
I think the issue is due to package.json main is pointing to ./lib/index which should point to dist folder instead.
@beeing
You can fix the angular build by adding node_modules/jszip/dist/jszip.min.js to the tsconfig -> compilerOptions -> paths
Has anyone figured out how to use jszip with react-native?
I fixed this error by installing the unresolved module. So npm i stream --save and then clearing cache and restarting watchman fixed the issue.
Most helpful comment
I fixed this error by installing the unresolved module. So
npm i stream --saveand then clearing cache and restarting watchman fixed the issue.