npm install のエラー
目次
エラー
npm install を実行するとエラーが..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
$ npm install npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-7b8bc2a2/package.json' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-420d9bf3/package.json' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-7b8bc2a2/index.js' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-420d9bf3/index.js' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-7b8bc2a2/license' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-420d9bf3/license' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-7b8bc2a2/readme.md' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/camelcase-420d9bf3/readme.md' npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/async-07a88746/LICENSE' npm WARN tar ENOENT: no such file or directory, open '/path/node_modules/.staging/async-07a88746/CHANGELOG.md' npm WARN tar zlib: Cannot read property 'length' of null npm WARN tar zlib: Cannot read property 'length' of null npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: zlib: Cannot read property 'length' of null npm WARN @1.0.0 No description npm WARN @1.0.0 No repository field. npm ERR! zlib: Cannot read property 'length' of null npm ERR! A complete log of this run can be found in: npm ERR! /Users/path/.npm/_logs/2019-08-21T07_42_17_893Z-debug.log |
node_modules ディレクトリは作成されるけど中は空っぽのまま・・
原因
Node.js が古いためだったようです。
対策
バージョンアップしたらインストール出来るようになりました。
エラー解消
バージョンアップ後に npm install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
$ npm install npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js > fsevents@1.2.9 install /path/node_modules/fsevents > node install node-pre-gyp WARN Using request for node-pre-gyp https download [fsevents] Success: "/path/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote > node-sass@4.12.0 install /path/node_modules/node-sass > node scripts/install.js Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/darwin-x64-64_binding.node Download complete ░⸩ ⠋ : Binary saved to /path/node_modules/node-sass/vendor/darwin-x64-64/binding.node Caching binary to /path/.npm/node-sass/4.12.0/darwin-x64-64_binding.node > node-sass@4.12.0 postinstall /path/node_modules/node-sass > node scripts/build.js Binary found at /path/node_modules/node-sass/vendor/darwin-x64-64/binding.node Testing binary Binary is fine npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN package@1.0.0 No description npm WARN package@1.0.0 No repository field. added 654 packages from 402 contributors and audited 5295 packages in 43.643s found 7 vulnerabilities (1 low, 6 high) run `npm audit fix` to fix them, or `npm audit` for details |
node_modules の中にもインストールされて、
無事 gulp も実行出来るようになりました。