Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

npm: Error: npm doesn't work with node v0.9.0-pre #3616

Closed
bnoordhuis opened this Issue · 7 comments

6 participants

Ben Noordhuis Oleg Efimov Matt Eldridge null Barry isaacs
Ben Noordhuis

After a make install with the current master branch (fee02db).

$ npm install buffertools
Error: npm doesn't work with node v0.9.0-pre
Required: node@0.6 || 0.7 || 0.8
    at /home/bnoordhuis/opt/node/lib/node_modules/npm/bin/npm-cli.js:67:23
    at Object.<anonymous> (/home/bnoordhuis/opt/node/lib/node_modules/npm/bin/npm-cli.js:87:3)
    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.runMain (module.js:487:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

/cc @isaacs

isaacs isaacs was assigned
Ben Noordhuis

Interestingly, npm -v prints this:

$ npm -v
[TypeError: Object function log(msg, pref, level, cb) {
  if (typeof level === "function") cb = level, level = null
  var show = log.level
  if (show === LEVEL.silent || show === LEVEL.paused) return cb && cb()
  if (level == null) level = LEVEL.info
  if (isNaN(level)) level = LEVEL[level]
  else level = +level

  // logging just undefined is almost never the right thing.
  // a lot of these are kicking around throughout the codebase
  // with relatively unhelpful prefixes.
  if (msg === undefined && level > LEVEL.silly) {
    msg = new Error("undefined log message")
  }
  if (typeof msg === "object" && (msg instanceof Error)) level = LEVEL.error
  if (!ini.resolved && waitForConfig || level === LEVEL.paused) {
    return logBuffer.push([msg, pref, level, cb])
  }
  if (logBuffer.length && !logBuffer.discharging) {
    logBuffer.push([msg, pref, level, cb])
    logBuffer.discharging = true
    logBuffer.forEach(function (l) { log.apply(null, l) })
    logBuffer.length = 0
    delete logBuffer.discharging
    return
  }
  log.level = show
  npm.emit("log", { level : level, msg : msg, pref : pref, cb : cb })
  npm.emit("log."+normalNames[level], { msg : msg, pref : pref, cb : cb })
} has no method 'error']
Oleg Efimov

Looks like npmlog module is missing. Same thin happens to me on one of latest 0.7x, AFAIR 0.7.18. Isaacs updated tarball after first publishing at that time.

Matt Eldridge

i'm seeing this same issue

built 0.9.0-pre on a fresh EC2 ( Linux version 2.6.38-8-virtual (buildd@allspice) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu3) ) #42-Ubuntu SMP Mon Apr 11 04:06:34 UTC 2011 )

npm install <anything>

spits out the message

Error: npm doesn't work with node v0.9.0-pre
Required: node@0.6 || 0.7 || 0.8...

it goes away if i roll back to v0.8

null

I met the same issue.

~/node$ sudo npm install jitsu -g
Error: npm doesn't work with node v0.9.0-pre
Required: node@0.6 || 0.7 || 0.8
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:67:23
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:87:3)
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.runMain (module.js:487:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)

/usr/local/lib/node_modules/npm/node_modules/proto-list/proto-list.js:42
return this.list[0][key]
^
TypeError: Cannot read property '_exit' of undefined
at Object.ProtoList.get (/usr/local/lib/node_modules/npm/node_modules/proto-list/proto-list.js:42:26)
at Object.get (/usr/local/lib/node_modules/npm/lib/utils/ini.js:316:32)
at Object.npm.config.get (/usr/local/lib/node_modules/npm/lib/npm.js:390:39)
at exit (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:50:27)
at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:252:3)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:67:10
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:87:3)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)

isaacs isaacs closed this issue from a commit
isaacs isaacs npm: upgrade to 1.1.39
Fix #3616
eb9b8f5
isaacs isaacs closed this in eb9b8f5
Barry

I had the same issue with npm 1.1.4 using node 0.9.0. Had to revert back to node 0.8.
Has this been re-introduced perhaps?

Oleg Efimov

Has this been re-introduced perhaps?

No. This was fixed in master but v0.9.1 is not released yet.

Update: You can build node from source to try 0.9.x branch, if you really want it.

isaacs
Owner

Node 0.9.0 has a working npm included with it.

If you're using npm 1.1.4 it's not going to work. (Note that npm version 0.0.3 or 0.2.12 don't work with node 0.9 either.) Changes in node require changes in npm sometimes. Upgrade npm. It works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.