2017-09-16 68 views
0
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。試圖谷歌錯誤調試它,但只發現問題沒有答案!任何人都可以幫忙嗎?不能安裝npm,得到module.js錯誤,做FCC節點.js挑戰

+0

嘗試安裝不同版本的包? –

回答

1

它看起來像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 

I found this issue happen on other learners of Free Code Camp

+0

太棒了!感謝它的工作。我更新了node.js和npm兩個:) – Anamika