简体   繁体   中英

Error in node.js when trying to install Ionic on Ubuntu 12.04

I'm trying to install Ionic on Ubuntu 12.04, but I get this error message:

node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
TypeError: Object #<Object> has no method 'tmpDir'
    at /usr/local/lib/node_modules/npm/node_modules/osenv/osenv.js:49:13
    at Object.tmpdir (/usr/local/lib/node_modules/npm/node_modules/osenv/osenv.js:14:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/config/defaults.js:76:18)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:32)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/config/core.js:4:18)

My node version is v0.6.12.

Could you please update the node to latest version. 0.6.12 is way behind the current node version, also see what version of node js ionic supports.

Current NodeJS Version is 0.12.2

Turns out the problem was related to npm and not nodejs. After checking what Sathish suggested, I realized that I couldn't use npm not even to check its version. I removed both nodejs and npm and I followed this tutorial and everything works fine. Thanks to everybody!

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