Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

"npm update" fails when a binary in the package has been (re)moved #1302

Closed
papandreou opened this issue Aug 24, 2011 · 1 comment
Closed

Comments

@papandreou
Copy link

I published two versions of a package named brokenbin in order to demonstrate the issue. Its package.json specifies a "bin" directory. In version 0.0.1 it only contains bin/binary1.js, and in version 0.0.2 it only contains bin/binary2.js.

Here's what happens when I install version 0.0.1, then upgrade to 0.0.2:

andreas@papandreou:~/work/foo$ npm install brokenbin@0.0.1
brokenbin@0.0.1 ./node_modules/brokenbin 
andreas@papandreou:~/work/foo$ npm install brokenbin@0.0.2
npm ERR! error installing brokenbin@0.0.2 Error: ENOENT, No such file or directory '/home/andreas/work/foo/node_modules/brokenbin/bin/binary1.js'
npm ERR! Error: ENOENT, No such file or directory '/home/andreas/work/foo/node_modules/brokenbin/bin/binary1.js'
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 Linux 2.6.35-30-generic
npm ERR! command "node" "/home/andreas/.local/bin/npm" "install" "brokenbin@0.0.2"
npm ERR! cwd /home/andreas/work/foo
npm ERR! node -v v0.4.11-pre
npm ERR! npm -v 1.0.26
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/andreas/work/foo/npm-debug.log
npm not ok

You're very welcome to remove the brokenbin package from the repo :)

Best regards,
Papandreou

@isaacs
Copy link
Contributor

isaacs commented Aug 24, 2011

Ooh, nice one! Here's the problem:

npm verb from cache /Users/isaacs/dev-src/js/npm/node_modules/brokenbin/package.json

Need to clear out hte package.json cache in the unbuild step.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants