isaacs/npm — Issue #2045: Can't find package.json for local installs
Author: rlayte
Created: 2012-01-16 14:05:53+00:00
State: open

I'm getting the following error when I try to install any packages locally

`vagrant@natty:/projects $ npm install express
npm http GET https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/express
npm ERR! error installing express@2.5.6
npm ERR! error rolling back express@2.5.6 Error: UNKNOWN, unknown error '/projects/node_modules/express'

npm ERR! Error: ENOENT, no such file or directory '/projects/node_modules/express/package.json'
npm ERR! You may report this log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 2.6.38-8-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "express"
npm ERR! cwd /projects
npm ERR! node -v v0.6.2
npm ERR! npm -v 1.1.0
npm ERR! path /projects/node_modules/express/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/projects/node_modules/express/package.json'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /projects/npm-debug.log
npm not ok`

The package.json files are present in the location it's looking for, but it means none of the package's dependencies are installed.

If install globally the errors go away.

I'm running Ubuntu server 11.04