运行npm安装不会生成锁文件
运行运行npm安装不会生成锁文件,npm,npm-install,Npm,Npm Install,运行npm install时,它将在何时生成包锁.json文件,何时不生成 这是我正在使用的npm版本: $ npm --version 3.10.10 这是我正在测试的一个简单的包.josn: $ cat package.json { "name": "invoices_svc", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Err
npm install
时,它将在何时生成包锁.json
文件,何时不生成
这是我正在使用的npm版本:
$ npm --version
3.10.10
这是我正在测试的一个简单的包.josn
:
$ cat package.json
{
"name": "invoices_svc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.16.2"
},
"repository": {
"type": "git",
"url": "git@.../TotalInvoiceDemoApp.git"
},
"description": "..."
}
由于某些原因,我没有看到在运行npm install
后创建的包锁.json
我还试着用这个构建docker图像,我注意到警告:
npm通知创建了一个锁文件,名为package-lock.json。你应该提交这个文件
在我的本地开发环境中,可能有一些明显的配置我错过了?为什么它不会在本地生成锁文件 在npm 5.0.0版中引入了锁文件,您需要更新npm以生成锁文件在npm 5.0.0版中引入了锁文件,您需要更新npm以生成锁文件
...
Step 4/7 : RUN npm install
---> Running in f4c48bbcc52a
npm notice created a lockfile as package-lock.json. You should commit this file.
...