npm install doesn't install any dependencies

后端 未结 2 1943
既然无缘
既然无缘 2021-01-12 02:27

I am trying to install packages in the package.json file. Unfortunately, when I run npm install, nothing happens (nothing is installed). I have u

相关标签:
2条回答
  • 2021-01-12 03:20

    npm install doesn't install (or echo) anything when all of the dependencies are satisfied. Ensure there's a serialport folder under node_modules.

    If you want to reinstall everything, you just need to remove the node_modules folder:

    rm -r node_modules
    npm install
    
    0 讨论(0)
  • 2021-01-12 03:21

    If you have an npm-shrinkwrap.json file, check it. The npm install command will only install the packages specified in that file.

    According to the npm install docs:

    If the package has a shrinkwrap file, the installation of dependencies will be driven by that.

    I had the same problem with my project. And when I looked at my npm-shrinkwrap.json file, I saw dependencies: {}. So that's why it didn't install anything for me.

    0 讨论(0)
提交回复
热议问题