Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

updated to 10.32, npm stopped working altogether. #6348

Closed
daanaerts opened this issue Sep 29, 2014 · 2 comments
Closed

updated to 10.32, npm stopped working altogether. #6348

daanaerts opened this issue Sep 29, 2014 · 2 comments

Comments

@daanaerts
Copy link

Latest thing I did, before npm stopped working altogether and gives error 340

Daans-MacBook-Pro:~ daanaerts$ sudo n stable

     install : v0.10.32
       mkdir : /usr/local/n/versions/0.10.32
       fetch : http://nodejs.org/dist/v0.10.32/node-v0.10.32-darwin-x64.tar.gz
   installed : v0.10.32

now every npm command returns

Daans-MacBook-Pro:jvdb2015 daanaerts$ npm

module.js:340
    throw err;
          ^
Error: Cannot find module './fs.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
@kenany
Copy link
Contributor

kenany commented Sep 29, 2014

    at Object.<anonymous> (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:3:27)
                                                  ^^^^^^^

That's Node.js v0.10.26 :)

@othiym23
Copy link
Contributor

This is due to a conflict between using a Homebrew-installed node + packaged npm (/usr/local/Cellar/node/0.10.26/lib/node_modules/npm), and trying to install a new Node with n over the top of it. Looks like you probably need to uninstall Node using both n and Homebrew's uninstall commands and then start over again with just n.

Also, this is not even remotely an npm issue. ;) Good luck!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants