7

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?

0

3 Answers 3

14

Try this:

rm -rf node_modules
npm install
Sign up to request clarification or add additional context in comments.

Comments

2

What worked for me is to delete the package-lock.json file and the node_modules folder, then run npm install.

Comments

1

It's a core node lib. Try first,

npm cache clean

If not work, reinstall node

1 Comment

I reinstall node but also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.