2016-06-22 20 views
4

以下は私のpackage.jsonファイルです。私は、他のを仮定している私のpackage.jsonファイルで「minimatch」のようなモジュールを持っていないとしてnpm状態のモジュールが見つからない場合は

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: [email protected]<3.0.0 is no longer maintained. Upgrade to [email protected]^4.0.0. 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN prefer global [email protected] should be installed with -g 

:ランで私は次のエラーを取得する「NPMインストール」

{ 
    "name": "test", 
    "version": "1.0.0", 
    "description": "web_app", 
    "main": "index.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1" 
    }, 
    "author": "Brad", 
    "license": "ISC", 
    "devDependencies": { 
    "babel-preset-es2015": "^6.9.0", 
    "browser-sync": "^2.13.0", 
    "del": "^2.2.0", 
    "gulp": "^3.9.1", 
    "gulp-autoprefixer": "^3.1.0", 
    "gulp-babel": "^6.1.2", 
    "gulp-changed": "^1.3.0", 
    "gulp-cssnano": "^2.1.2", 
    "gulp-file-include": "^0.13.7", 
    "gulp-htmlmin": "^2.0.0", 
    "gulp-if": "^2.0.1", 
    "gulp-sass": "^2.3.2", 
    "gulp-size": "^2.1.0", 
    "gulp-sourcemaps": "^1.6.0", 
    "gulp-uglify": "^1.5.3", 
    "gulp-uncss": "^1.0.5", 
    "gulp-useref": "^3.1.0", 
    "htmlmin": "0.0.6", 
    "run-sequence": "^1.2.1" 
    }, 
    "dependencies": { 
    "rxjs-es": "^5.0.0-beta.9" 
    } 
} 

モジュールはそれに依存します。だから私はすべての時代遅れのモジュールをグローバルにインストールしました。これにより、エラーメッセージは削除されませんでした。しかし、コンピュータを再起動して同じgulpタスクを実行しようとすると、node_modulesフォルダに入っていても、モジュールが見つからないということになります。何か案は?

答えて

2

はい、あなたの依存関係は廃止予定のパッケージを使用しています。

npm lsを実行して、古いパッケージを参照している依存関係を確認してください。

enter image description here

+0

を実行して、最新バージョン3.0.2にアップデートminimatch? 'npm update'を実行しても更新されません。 –

+1

正しいです。 npmより古いパッケージは、あなたが依存関係としてリストアップした古いパッケージのみを表示します。パッケージのパブリッシャーは、廃止予定パッケージを更新するため、別のパッケージを使用するか、そうでなければ警告を無視します問題またはセキュリティの欠陥を表します。 –

+0

それは問題ではない場合は、誰も私は私のコンピュータを再起動するたびにすべてのモジュールを再インストールする必要がある理由を知っていますか? –

0

あなたがそれらのパッケージを更新することになっている方法以外のすべてを一覧表示し、次のコマンド

npm update -g [email protected] 
+0

not working :(:( –

+0

私の場合、Node.jsのバージョンをダウングレードした後に動作しました –

関連する問題