NPM,无论我做什么都找不到“优雅的fs” [英] NPM, cannot find 'graceful-fs', no matter what I do
问题描述
当我尝试为node.js安装express时,这是我得到的。
This is what I get when I try to install express for node.js
npm install express
module.js:340
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/usr/share/npm/lib/utils/ini.js:32:10)
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)
我甚至试过别人,错误。我做了一些挖掘,我在我的服务器上找到了gracefui-fs。
I even tried others and still got the same error. I did some digging and i did find 'gracefui-fs' on my server.
我在一个亚马逊ec2服务器上运行ubuntu 12.04 LTS。节点安装没有错误,而npm仍然没有工作。我也没有安装并重新安装npm使用
I am running ubuntu 12.04 LTS on an amazon ec2 server. Node installed with no errors, and npm still didn't work. I also un installed and re installed npm using
apt-get
以及源代码。在安装过程中,我也没有收到错误。
as well as from source. During installation I received no errors either.
推荐答案
有同样的问题。不要从 aptitude
或 apt-get
下载 npm
。
Had the same problem. Don't download npm
from aptitude
or apt-get
.
而是尝试:
git clone git://github.com/isaacs/npm.git
cd npm/scripts
chmod +x install.sh
sudo ./install.sh
看到这里: NPM无法安装appjs。错误:找不到模块'graceful-fs'
这篇关于NPM,无论我做什么都找不到“优雅的fs”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!