NPM,无论我做什么,都找不到 'graceful-fs' [英] NPM, cannot find 'graceful-fs', no matter what I do

查看:61
本文介绍了NPM,无论我做什么,都找不到 'graceful-fs'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我尝试为 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.Node 安装没有错误,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.

推荐答案

遇到了同样的问题.不要从 aptitudeapt-get 下载 npm.

Had the same problem. Don't download npm from aptitude or apt-get.

改为尝试:

git clone --depth=1 git://github.com/npm/cli.git
cd cli/scripts
chmod +x install.sh
sudo ./install.sh

在这里看到:NPM 无法安装应用程序错误:找不到模块graceful-fs"

这篇关于NPM,无论我做什么,都找不到 'graceful-fs'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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