npm インストール時に最大コールスタックサイズを超えました 質問する

npm インストール時に最大コールスタックサイズを超えました 質問する

を実行しようとしていますnpm install。コンソールからの出力は次のとおりです:

npm ERR! Linux 4.8.0-27-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8

npm ERR! Maximum call stack size exceeded
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

これは次の内容ですnpm-debug.log:

113791 verbose stack RangeError: Maximum call stack size exceeded
113791 verbose stack     at Object.color (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/console-control-strings/index.js:115:32)
113791 verbose stack     at EventEmitter.log._format (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:252:51)
113791 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:138:24)
113791 verbose stack     at emitThree (events.js:116:13)
113791 verbose stack     at emit (events.js:194:7)
113791 verbose stack     at .<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:23:18)
113791 verbose stack     at emitThree (events.js:116:13)
113791 verbose stack     at emit (events.js:194:7)
113791 verbose stack     at .<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:23:18)
113791 verbose stack     at emitThree (events.js:116:13)
113791 verbose stack     at emit (events.js:194:7)
113792 verbose cwd /home/giorgi/AdMove/dev/web-advertiser-admove
113793 error Linux 4.8.0-27-generic
113794 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
113795 error node v6.9.1
113796 error npm  v3.10.8
113797 error Maximum call stack size exceeded
113798 error If you need help, you may report this error at:
113798 error     <https://github.com/npm/npm/issues>
113799 verbose exit [ 1, true ]

何度か削除しnode_modulesて再インストールを試みました。原因と修正方法がわかりません。

ベストアンサー1

メッツェルダーの答え問題を解決するのに役立ちました。ただし、コマンドを実行するとnpm cache cleanメッセージが表示されます

npm@5では、npmキャッシュは破損の問題から自己修復し、キャッシュから抽出されたデータは有効であることが保証されます。

したがって、npm5 では、--forceコマンドにフラグを追加することで実行できます。

したがって、コマンドは次のようになります。

npm cache clean --force

おすすめ記事