Nikki
Nikki

Reputation: 43

I keep getting 'Cannot find module' Error when running docker compose up after installing package already

I am trying to add cdn urls to my gulp pipeline, I came across https://fettblog.eu/gulp-merge-cdn-files-into-your-pipeline/ and sudo npm installed the necessary but I keep getting error below

gulp_1           | module.js:550
gulp_1           |     throw err;
gulp_1           |     ^
gulp_1           | 
gulp_1           | Error: Cannot find module 'vinyl-source-stream'
gulp_1           |     at Function.Module._resolveFilename (module.js:548:15)
gulp_1           |     at Function.Module._load (module.js:475:25)
gulp_1           |     at Module.require (module.js:597:17)
gulp_1           |     at require (internal/module.js:11:18)
gulp_1           |     at Object.<anonymous> (/node_modules/gulp/gulpfile.js:8:14)
gulp_1           |     at Module._compile (module.js:653:30)
gulp_1           |     at Object.Module._extensions..js (module.js:664:10)
gulp_1           |     at Module.load (module.js:566:32)
gulp_1           |     at tryModuleLoad (module.js:506:12)
gulp_1           |     at Function.Module._load (module.js:498:3)

I installed the modules accordingly

sudo npm install vinyl-source-stream

sudo npm install request

sudo npm install merge2

sudo npm install gulp-buffer

I also ran npm install again, but still got the error, I then reinstalled the modules with -g after, recommended here [Gulp error, cannot find module 'vinyl' but the error still shows

Can anyone shine some light on this for me or please help me in a different way to be able to add cdns within my gulp file to build into one js file together with others and js files?

Thanks

Upvotes: 2

Views: 735

Answers (1)

linthertoss
linthertoss

Reputation: 164

Try:

    npm install vinyl-source-stream --save

    docker-compose build

    docker-compose down

    docker-compose up

Upvotes: 1

Related Questions