error log from npm install -g brunch #2016

Closed
benstraw opened this Issue Jan 10, 2012 · 10 comments

Projects

None yet

4 participants

@benstraw

npm ERR! Couldn't read dependencies.
npm ERR! Error: ENOENT, no such file or directory '/Users/ben/package.json'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Darwin 11.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/ben
npm ERR! node -v v0.6.7
npm ERR! npm -v 1.1.0-beta-10
npm ERR! path /Users/ben/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/Users/ben/package.json'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/ben/npm-debug.log
npm not ok
severian:~ ben$

@benstraw

this is a brand new fresh install of node 0.6.7, trying to run npm install results in this error.

@welwood08
Contributor

The error says it all, there is no node module in your home directory for npm to install. The title seems to be unrelated to the actual command run.

@benstraw

is there something i have to run first. it's a clean install of node, and the instructions on brunch just said to run:
npm install -g brunch ...

do i need to create a package.json file there, i thought this would be automatically setup.

thanks.

@benstraw

from the brunch docs:

Getting started
You'll need node.js 0.6. Execute:

npm install -g brunch
You're done!

@welwood08
Contributor

Okay, I won't dispute those instructions - they seem like they would indeed install brunch globally. However, the error log is for the command npm install, which is quite different from npm install -g brunch.

@benstraw

severian:~ ben$ npm install -g brunch
npm ERR! Error: UNKNOWN, unknown error '/usr/local/lib'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Darwin 11.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "brunch"
npm ERR! cwd /Users/ben
npm ERR! node -v v0.6.7
npm ERR! npm -v 1.1.0-beta-10
npm ERR! path /usr/local/lib
npm ERR! code UNKNOWN
npm ERR! message UNKNOWN, unknown error '/usr/local/lib'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/ben/npm-debug.log
npm not ok
severian:~ ben$

don't know if this helps...

severian:~ ben$ ls /usr/local/lib/node
wafadmin
severian:~ ben$ ls /usr/local/lib/node_modules/
npm

@welwood08
Contributor

I imagine you'll need sudo to install global modules into /usr.

npm should probably know what the error is and tell users though, so I suppose that part is a bug.

@benstraw

ok, so installing with out -g worked, sort of...

severian:~ ben$ brunch
-bash: brunch: command not found

but no brunch after it completed successfully. do i need to add something to my path for node packages?

thanks for your help!

@welwood08
Contributor

Installing without -g will install it in ./node_modules which is highly unlikely to be what you want if your current directory is ~.

Command-line tools are usually installed globally, hence the brunch install instructions using -g.

@ralt
Contributor
ralt commented Mar 9, 2013

In the first post, you forgot the -g option.

npm ERR! command "node" "/usr/local/bin/npm" "install"

And as @welwood08 said, you should try using sudo npm install -g brunch.

If the error persists, gist the npm-debug.log file and paste the link here.

@luk- luk- closed this Mar 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment