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 に答える