Npm install cannot find module 'semver'

后端 未结 26 1519
南方客
南方客 2020-11-29 15:29

I can\'t use npm install using the command prompt in NodeJS. I\'m getting these errors when running npm install:

module.js:339
             


        
26条回答
  •  感动是毒
    2020-11-29 15:46

    For me, it happened while upgrading to gulp 4 from gulp 3 in my project. So, when I run "gulp watch" command, it was throwing me same error.

    It's probably due to version mismatch as compared to my globally installed gulp.

    So, either upgrading gulp with "-g" global flag would help, or else I followed this below

    However, I used "./node_modules/.bin/gulp watch" in my project. This ensures that all the dependencies that gulp needs are taken from node_modules only.

提交回复
热议问题