简体   繁体   中英

graceful-fs module not found w/ npm

I'm trying to install a module with npm but keep getting an error regarding 'graceful-fs'.

$ npm install testacular
  node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
  Error: Cannot find module 'graceful-fs'
    at Function._resolveFilename (module.js:334:11)
    at Function._load (module.js:279:25)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/usr/share/npm/lib/utils/ini.js:32:10)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)

I then tried to install 'graceful-fs' and got the exact same error. So, I THEN tried seeing what version of npm I have installed and got the same...exact...error...

I'm currently using node.js version 0.5.11-pre. How can I remedy this problem? It seems like EVERYTHING requires this module that's missing and there is no way I can download it.

EDIT:

I found that graceful-fs.js is in fact sitting in my /usr/lib/nodejs directory. I tried running:

npm install graceful-fs

Still, same exact error.

You'll likely want to try reinstalling node. Update while you're at it, unless you have a very specific reason to use 0.5 - odd versions are designated Unstable, even versions are Stable. 0.8 is the latest stable version.

I've seen this error occasionally when a module unrecoverably fails to install via npm. If npm won't do anything, try simply deleting graceful-fs from your nodejs directory if it's still there after updating Node.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM