Can't resolve 'stream'
See original GitHub issueWhat is wrong?
Installing brain.js via npm in an angular framework doesn’t work. Error:
ERROR in ./node_modules/brain.js/dist/train-stream.js
Module not found: Error: Can't resolve 'stream' in '../node_modules/brain.js/dist'
Where does it happen?
When running npm start
How do we replicate the issue?
- Fresh Project with Angular 7.1.4
npm install brain.js
npm start
How important is this (1-5)?
5
Expected behavior (i.e. solution)
Brain.js shouldn’t throw this error
Other Comments
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Module not found: Error: Can't resolve 'stream' in 'C:\dev\jszip ...
After reading this post I found out that the stream package was missing from my project. You can install it by running the...
Read more >Module not found: Error: Can't resolve 'stream' in React project ...
I believe changing react-scripts to 4.0.3 and rerunning yarn install or npm install would've fixed this issue. There are several ways to get...
Read more >Module not found: Error: Can't resolve 'stream' [Solved]
The error "Module not found: Error: Can't resolve 'stream'" occurs because there has been a breaking change in Webpack version 5. To solve...
Read more >Fail to compile: Can't resolve 'stream' · Issue #1645 - GitHub
I recently upgraded to webpack 5.65.0. @react-pdf/renderer@2.0.21 was working fine before I upgraded. Now 'npm start' gives me this error: ...
Read more >if you want to include a polyfill, you need to: - add a fallback ...
I had a minor fix, I was able to resolve the stream-browserify error by using npm install stream but ... Module not found:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Add this to tsconfig.json (found https://github.com/Stuk/jszip/issues/524):
Add this to polyfill.ts (found partly https://github.com/algolia/algoliasearch-client-javascript/issues/691, and above, ty @jordyvanderhaegen):
I installed this locally and was able to have the app simply work.
Ran into the same issue, got it temporarily fixed by adding the following to my index.html :
<script> var global = global || window; var Buffer = Buffer || []; var process = process || { env: { DEBUG: undefined }, version: [] }; </script>
https://stackoverflow.com/questions/50356408/upgrading-to-angular-6-x-gives-uncaught-referenceerror-global-is-not-defined