0

在 NPM 的 Lockdown.js 中,当我运行命令生成锁定文件时,我得到一个空文件,这里是依赖项的链接

NPM 锁定 git

接下来是我的 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/lockdown-relock

我收到此错误 `> nw@ preinstall C:\Users\cvega\Desktop\Cesar Settings\SampleProjects\NWGit\nw

封锁

NPM Lockdown 在这里检查您的依赖关系!从不畏惧!

错误:我无法读取lockdown.json!运行 node_modules/.bin/lockdown-relock 生成!`

4

1 回答 1

0

我从来没有让它工作,但我使用 npm shrinkwrap

它的工作我遇到的唯一问题是我必须删除所有与我的 package.json 文件不匹配的依赖项,我使用 npm ls 找到它们,它将列出安装在节点模块中的包

于 2016-01-14T14:34:05.203 回答