flatiron / cliff

Your CLI formatting friend

Home Page:http://github.com/nodejitsu/cliff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm install fails on OS X

fritzy opened this issue · comments

wall:~ fritzy$ npm install cliff
npm ERR! error installing winston@0.2.11 Error: Unsupported
npm ERR! error installing winston@0.2.11 at checkEngine (/Users/fritzy/local/lib/node_modules/npm/lib/install.js:500:14)
npm ERR! error installing winston@0.2.11 at nextStep (/Users/fritzy/local/lib/node_modules/npm/lib/utils/chain.js:54:8)
npm ERR! error installing winston@0.2.11 at chain (/Users/fritzy/local/lib/node_modules/npm/lib/utils/chain.js:27:3)
npm ERR! error installing winston@0.2.11 at installOne_ (/Users/fritzy/local/lib/node_modules/npm/lib/install.js:478:3)
npm ERR! error installing winston@0.2.11 at installOne (/Users/fritzy/local/lib/node_modules/npm/lib/install.js:418:3)
npm ERR! error installing winston@0.2.11 at /Users/fritzy/local/lib/node_modules/npm/lib/install.js:360:9
npm ERR! error installing winston@0.2.11 at /Users/fritzy/local/lib/node_modules/npm/lib/utils/async-map.js:57:35
npm ERR! error installing winston@0.2.11 at Array.forEach (native)
npm ERR! error installing winston@0.2.11 at /Users/fritzy/local/lib/node_modules/npm/lib/utils/async-map.js:57:11
npm ERR! error installing winston@0.2.11 at Array.forEach (native)
npm ERR! error installing cliff@0.1.1 Error: Unsupported
npm ERR! error installing cliff@0.1.1 at checkEngine (/Users/fritzy/local/lib/node_modules/npm/lib/install.js:500:14)
npm ERR! error installing cliff@0.1.1 at nextStep (/Users/fritzy/local/lib/node_modules/npm/lib/utils/chain.js:54:8)
npm ERR! error installing cliff@0.1.1 at chain (/Users/fritzy/local/lib/node_modules/npm/lib/utils/chain.js:27:3)
npm ERR! error installing cliff@0.1.1 at installOne_ (/Users/fritzy/local/lib/node_modules/npm/lib/install.js:478:3)
npm ERR! error installing cliff@0.1.1 at installOne (/Users/fritzy/local/lib/node_modules/npm/lib/install.js:418:3)
npm ERR! error installing cliff@0.1.1 at /Users/fritzy/local/lib/node_modules/npm/lib/install.js:360:9
npm ERR! error installing cliff@0.1.1 at /Users/fritzy/local/lib/node_modules/npm/lib/utils/async-map.js:57:35
npm ERR! error installing cliff@0.1.1 at Array.forEach (native)
npm ERR! error installing cliff@0.1.1 at /Users/fritzy/local/lib/node_modules/npm/lib/utils/async-map.js:57:11
npm ERR! error installing cliff@0.1.1 at Array.forEach (native)
npm ERR! error installing mongodb@0.9.4-5 Error: ENOENT, No such file or directory '/Users/fritzy/node_modules/cliff/node_modules/winston/node_modules/___mongodb.npm/package/test/index_test.js'
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: loggly@0.3.3
npm ERR! Required: {"node":"0.4.x"}
npm ERR! Actual: {"npm":"1.0.8","node":"v0.5.0-pre"}
npm ERR!
npm ERR! System Darwin 10.7.0
npm ERR! command "node" "/Users/fritzy/local/bin/npm" "install" "cliff"
The following files couldn't be removed.
Remove them manually and try again

sudo rm -rf "/Users/fritzy/node_modules/cliff/node_modules/winston"

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/fritzy/npm-debug.log
npm not ok

Also, why does it try to install something mongodb related?

Cliff uses winston. Winston has a MongoDB transport. That installs BSON. I thought I fixed all of the node 0.4.x issues, but I guess not. Thanks, I'll fix this tonight.

@fritzy the error is:

 npm ERR! Required: {"node":"0.4.x"}
 npm ERR! Actual: {"npm":"1.0.8","node":"v0.5.0-pre"}

because you are running 0.5.0-pre and node-loggly apparently requires 0.4.x ( see: https://github.com/nodejitsu/node-loggly/blob/master/package.json#L24 )

You could downgrade to the stable branch of node ( v0.4.x ) or you can manually install node-loggly, modify the package.json and link it. I suppose we could change loggly to support the experimental 0.5.x branch.

In regards to the MongoDB question, it is because you are installing Winston, which can use MongoDB as a logging transport. This shouldn't cause any issues.

It would be nice have "optional deps", but npm doesn't really have the facilities for doing that now.

This should be fixed now. I just published loggly 0.3.4. I had actually fixed the package.json, but not published it. Let me know if that doesn't fix it.

I agree with the lazy loading of dependencies in winston, but with the npm 1.0 structure the error messages could be cryptic.