在NPM的Lockdown.js中,当我运行命令生成锁定文件时,我得到一个空文件,这里是依赖项的链接
然后我的package.json
{
"name": "nw",
"private": true,
"devDependencies": {
"grunt": "^0.4.5",
"grunt-angular-templates": "^0.5.7",
"grunt-autoprefixer": "^2.0.0",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-cssmin": "^0.12.0",
"grunt-contrib-htmlmin": "^0.4.0",
"grunt-contrib-imagemin": "^1.0.0",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.7.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-filerev": "^2.1.2",
"grunt-google-cdn": "^0.4.3",
"grunt-karma": "*",
"grunt-newer": "^1.1.0",
"grunt-ng-annotate": "^0.9.2",
"grunt-svgmin": "^2.0.0",
"grunt-usemin": "^3.0.0",
"grunt-wiredep": "^2.0.0",
"gulp": "^3.9.0",
"jit-grunt": "^0.9.1",
"jshint-stylish": "^1.0.0",
"karma-coverage": "^0.5.3",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^0.2.1",
"phantomjs": "^1.9.18",
"protractor-jasmine2-screenshot-reporter": "^0.2.0",
"time-grunt": "^1.0.0",
"vinyl-fs": "2.2.1"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"preinstall": "lockdown",
"test": "grunt test",
"install": "node node_modules/protractor/bin/webdriver-manager update"
},
"dependencies": {
"bower": "^1.7.2",
"karma": "^0.13.19",
"karma-jasmine-jquery": "^0.1.1",
"lockdown": "0.0.8-dev",
"protractor": "^3.0.0",
"request": "^2.67.0"
}
}
以及我运行命令时得到的错误
node_modules /的.bin /锁定-重新锁定
我收到此错误`> nw @preinstall C:\ Users \ cvega \ Desktop \ Cesar Settings \ SampleProjects \ NWGit \ nw
锁定
NPM Lockdown用于检查您的依赖项!永远不要害怕!
错误:我无法读取lockdown.json!运行node_modules / .bin / lockdown-relock生成!`
答案 0 :(得分:0)
我从来没有工作,但我使用npm shrinkwrap
它的工作唯一的问题是我必须删除所有与我的package.json文件不匹配的依赖项,我发现它们使用npm ls,它将列出你的节点模块中的软件包安装