npm install installing extra packages not specified in package.json

前端 未结 2 1807
予麋鹿
予麋鹿 2021-02-15 13:53

I have a fairly typical package.json on an AWS ec2 instance. I\'m running npm install and instead of installing

{
  \"name\": \"angular         


        
相关标签:
2条回答
  • 2021-02-15 14:24

    They are dependencies of the modules you want. This can't be avoided.

    0 讨论(0)
  • 2021-02-15 14:28

    This is a difference between NPM 2 and NPM 3. NPM 3 will put the first version of a dependency as a peer and other versions of a dependency nested.

    • https://docs.npmjs.com/how-npm-works/npm3

    • https://github.com/npm/npm/issues/11586

    I guess it looks uglier, but takes less space.

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