Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js Cannot find module './internal/streams/stream'

Tags:

node.js

I get an error when I want to use gulp for deployment.

Error: Cannot find module './internal/streams/stream'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/var/www/pomelo/themes/pomelo/assets/js/node_modules/gulp-replace/node_modules/readable-stream/lib/_stream_readable.js:50:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

So I use npm install readable-stream, but this is still the error. Why? How can I fix it?

like image 788
Lancer Avatar asked Dec 14 '22 17:12

Lancer


1 Answers

Try this:

rm -rf node_modules
npm install
like image 188
Selcuk Avatar answered Dec 21 '22 10:12

Selcuk