NPM Install behaving differently between computers

后端 未结 1 1705
渐次进展
渐次进展 2020-12-12 02:58

Not sure why this is happening... been Googling but I can\'t seem to find an answer. I have 2 macs, on each of them I have a folder containing the same package.json file, wh

相关标签:
1条回答
  • 2020-12-12 03:29

    The newest version of NPM does a "flatter" install with dependencies not nested as deep as the earlier version. It sounds like if you compare NPM versions, you will find you have different versions on the two computers.

    Here's an article about the older way:

    npm is installing dependencies in a weird recursive way

    And, change log info about the new way:

    https://github.com/npm/npm/blob/master/CHANGELOG.md#flat-flat-flat

    One of the main advantages of this is the sharing (rather than duplicating) of module dependencies used by more that one parent module. In the new flat scheme, there is only one copy of the module that is used in more than one place rather than many copies.

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