npm install installing extra packages not specified in package.json

前端 未结 2 1812
予麋鹿
予麋鹿 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: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.

提交回复
热议问题