我已经安装了node.js.节点似乎工作正常,但是,npm没有找到,如下所示。我安装了Node.js,但是我无法在windows上使用npm
C:\Users\jpdrc>node -v
v6.5.0
C:\Users\jpdrc>node hello.js
node is installed!
C:\Users\jpdrc>npm -v
module.js:457
throw err;
^
Error: Cannot find module 'strip-ansi'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\jpdrc\AppData\Roaming\npm\node_modules\npm\node_modules\npmlog\node_modules\gauge\node_modules\string-width\index.js:2:17)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
我已经尝试了多种解决方案,为那些提出:
1- Windows -installed node.js but npm not found
2- Installing Node.js (and npm) on Windows 10
我不知道下一个尝试
感谢援助
Here are my variables under path
正如以下建议我用where npm
C:\Users\jpdrc>where npm
C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd
它在你的PATH? – Kosch
是的,我有从应用程序的数据在那里npm – jpdrcarneiro
尝试'在哪里npm'来检查是否有任何其他破的npm命令.. – lastr2d2