Module not found: Error: Can't resolve 'stream' in 'C:\dev\jszip-test\node_modules\jszip\lib'

Ricardo Rocha picture Ricardo Rocha · Apr 9, 2019 · Viewed 13k times · Source

I'm using jszip v3.2.1 in an angular 7 application. When I build my project (running, for example, npm start) I'm getting the following error:

ERROR in ./node_modules/jszip/lib/readable-stream-browser.js

Module not found: Error: Can't resolve 'stream' in 'C:\dev\jszip-test\node_modules\jszip\lib'

How can I solve this problem?

Answer

Ricardo Rocha picture Ricardo Rocha · Apr 9, 2019

After reading this post I found out that the stream package was missing from my project.

You can install it by running the following command:

npm i stream