Mac OS X npm上的node.js“错误:没有这样的模块"; [英] node.js on Mac OS X npm "Error: No such module"

查看:131
本文介绍了Mac OS X npm上的node.js“错误:没有这样的模块";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从pkg安装程序安装了node.js v0.8.8,并从源代码进行了编译.但是,尝试运行npm时出现以下错误.任何帮助将不胜感激.

I have installed node.js v0.8.8 both from the pkg installer and compiled from source. Yet I get the following error when trying to run npm. Any help would be appreciated.

>  $ npm --help
> 
> /usr/lib/node_modules/npm/lib/utils/config-defs.js:5   , stdio =
> process.binding("stdio")
>                     ^ Error: No such module
>     at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/config-defs.js:5:21)
>     at Module._compile (module.js:449:26)
>     at Object.Module._extensions..js (module.js:467:10)
>     at Module.load (module.js:356:32)
>     at Function.Module._load (module.js:312:12)
>     at Module.require (module.js:362:17)
>     at require (module.js:378:17)
>     at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/ini.js:43:18)
>     at Module._compile (module.js:449:26)
>     at Object.Module._extensions..js (module.js:467:10)

推荐答案

您很可能会以某种方式使用旧的NPM版本. 参见: npm问题

You are most likely using an old NPM version somehow. see: npm issue

这篇关于Mac OS X npm上的node.js“错误:没有这样的模块";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆