[英]Not able to install npm, getting module.js error which doing FCC node.js challenge
module.js:471
throw err;
^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/ubuntu/.nvm/versions/node/v6.11.2/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:26:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Uh oh! npm had a problem! { Error: Command failed: "/home/ubuntu/.nvm/versions/node/v6.11.2/bin/npm" --version
module.js:471
throw err;
嘗試執行FCC對node.js的第一個挑戰,但停留在安裝和驗證npm上。 試圖用Google搜索錯誤進行調試,但發現只有問題而沒有答案! 有人可以幫忙嗎?
看起來像是npm上的錯誤。 我建議更新Node.js和npm。
在控制台上運行以下命令:
$ nvm install 6 # This installs Node.js version 6.11.3, current latest version of Node.js 6.x
$ npm install --global npm # Install latest version of npm
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.