Node.js nodejs npm抛出错误
我只想通过软件包安装node 5.0.0。节点可以使用,但npm不能使用 我不知道怎么解决它Node.js nodejs npm抛出错误,node.js,npm,Node.js,Npm,我只想通过软件包安装node 5.0.0。节点可以使用,但npm不能使用 我不知道怎么解决它 Error: Cannot find module './lib' at Function.Module._resolveFilename (module.js:337:15) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at
Error: Cannot find module './lib'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/node_modules/hawk/index.js:1:80)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
错误:找不到模块'./lib'
在Function.Module.\u解析文件名(Module.js:337:15)
在Function.Module.\u加载(Module.js:287:25)
at Module.require(Module.js:366:17)
根据需要(module.js:385:17)
反对。(/usr/local/lib/node_modules/npm/node_modules/request/node_modules/hawk/index.js:1:80)
在模块处编译(Module.js:425:26)
在Object.Module.\u extensions..js(Module.js:432:10)
在Module.load(Module.js:356:32)
在Function.Module.\u加载(Module.js:311:12)
at Module.require(Module.js:366:17)
根据需要(module.js:385:17)
有人能帮我吗
我列出了错误日志
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module './lib'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm错误!达尔文14.5.0
npm错误!argv“/usr/local/bin/node”“/usr/local/bin/npm”
npm错误!节点v5.0.0
npm错误!npm v3.3.6
npm错误!找不到代码模块
npm错误!找不到模块'./lib'
npm错误!
npm错误!如果需要帮助,您可以在以下位置报告此错误:
npm错误!
其他有此问题的人请参见此处:
通过运行以下命令卸载nodejs:
rm -rf /usr/local/lib/node_modules/npm
重新安装nodejsv5似乎有帮助 其他有此问题的人请参见此处: 通过运行以下命令卸载nodejs:
rm -rf /usr/local/lib/node_modules/npm
重新安装nodejsv5似乎有帮助