Skip to content
This repository

Installing express with npm: failure #1111

Closed
ajoslin opened this Issue · 15 comments

4 participants

Andrew Joslin Yuan Chuan TJ Holowaychuk Austin Bales
Andrew Joslin

I'm on Mac OSX Lion.

Here is the log:

Andy-Joslin:projects atjoslin$ npm install -g express
npm http GET https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/formidable

npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/express/node_modules/connect/node_modules/formidable/package.json'
npm ERR! You may report this 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.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! cwd /Users/atjoslin/projects
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.9
npm ERR! path /usr/local/lib/node_modules/express/node_modules/connect/node_modules/formidable/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, open '/usr/local/lib/node_modules/express/node_modules/connect/node_modules/formidable/package.json'
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/atjoslin/projects/npm-debug.log
npm not ok
Yuan Chuan

try "sudo npm install -g express"

Andrew Joslin

Hi yuanchan,

It's still erroring with sudo - the exact same error in fact.

I added my OS (Mac OSX lion) details to the main post, incase it helps.

TJ Holowaychuk
Owner

did you try updating npm

Andrew Joslin

I still get the same error after npm update.

I do get a different error if I try to install express 3.0 alpha (using npm install -g express@3.0). Here is the log: http://d.pr/n/9cXb

I guess I can give a little more info as to what I did before this stopped working:
1. I had express current version nstalled and working, but then I tried to install express 3.0 alpha with npm install -g express@3.0. That gave me an error.
2. Then I tried to remove existing express with npm uninstall -g express. The uninstall worked fine.

3. Then I tried npm install -g express@3.0, and it still gave me the error above.

4. Then I tried just installing regular express again, and am getting this error.

I've tried all the installs without the -g too, incase my lib folders are messed up somehow. But the errors are the same without the global flag.

Hope that helps.

TJ Holowaychuk
Owner

seems like this is maybe more of an npm thing, can you install -g mocha etc fine? mocha --version

Andrew Joslin

Yeah, I can install coco, mocha, and coffee-script fine ( a few random libraries I thought of)

TJ Holowaychuk
Owner

hmm i dont know why formidable's package.json wouldn't be present. I just rm -fr node_modules when npm screws up and try again

TJ Holowaychuk
Owner

also remember to do npm install npm etc to update, npm update doesn't update npm itself AFAIK

Andrew Joslin

I removed npm and all my modules and re-installed it from the .pkg on nodejs.org.

I still get the same error when installing express, but other libraries install fine.

Should I open this issue on the formidable repo?

TJ Holowaychuk
Owner

not sure, i think it's an npm related bug, works 100% fine for me. closing until someone can reproduce

Austin Bales

This happens to me as well –

• Node v0.6.7 || v0.6.15
• npm 1.1.0-2 || 1.1.18
• "express": "latest"

Austin Bales

This appears to be either a bug in bsdtar or in the formidable tarball itself.

I was able to install the package by temporarily aliasing tar to gtar

brew install gnu-tar && alias tar=gtar

See also: npm/npm#2360 (comment)
And: npm/npm#1512 (comment)

Andrew Joslin

Hi arbales, I'm glad it works for you, but for me I still get the same error on installing formidable after doing that:

Andy-Joslin:views atjoslin$ brew list | grep gnu-tar
gnu-tar
Andy-Joslin:views atjoslin$ tar
gtar: You must specify one of the `-Acdtrux' or `--test-label'  options
Try `gtar --help' or `gtar --usage' for more information.
Andy-Joslin:views atjoslin$ sudo npm install -g formidable
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/formidable

npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/formidable/package.json'
Austin Bales

perhaps try rm -rf ./node_modules first?

it actually looks like we're experiencing different errors – NPM couldn't unarchive formidable for me.

Andrew Joslin

I managed to get it working now by installing connect v1.7.4 -- a version that doesn't use formidable, but still satisfies express's depency. Then I installed express, and all worked. So for now, I'm OK.

Andrew Joslin ajoslin referenced this issue in npm/npm
Closed

Failure to install express #2398

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.