如何为所有node / npm版本使用相同的package-lock.json

时间:2018-05-30 10:49:04

标签: node.js npm package-lock.json

是否可以拥有不同的节点版本(lts和current)并且具有相同的CollisionSystem

目前,当我运行package-lock.json时,它生成的软件包与npm install文件中指定的软件包不同。

例如,我使用package-lock.json(节点版本管理器)在同一台机器上测试不同的节点版本。

nvm输出nvm exec v10.3.0 npm i

package-lock.json

"babel-generator": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { "babel-messages": "^6.23.0", "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "detect-indent": "^4.0.0", "jsesc": "^1.3.0", "lodash": "^4.17.4", "source-map": "^0.5.7", "trim-right": "^1.0.1" } }, 输出nvm exec v8.11.2 npm i

package-lock.json

因此,这两个版本之间会发生很多git冲突。

"babel-generator": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { "babel-messages": "6.23.0", "babel-runtime": "6.26.0", "babel-types": "6.26.0", "detect-indent": "4.0.0", "jsesc": "1.3.0", "lodash": "4.17.10", "source-map": "0.5.7", "trim-right": "1.0.1" } }, 中是否有任何配置为package.json提供相同的输出?

0 个答案:

没有答案