Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"ERR! not a package" when installing node.js dependencies for yepnope.js

Pretty sure I'm doing something daft here - I'm not convinced it's specific to yepnope... my node knowledge isn't that hot.

Just trying to grab & build the repo to play around with some stuff (I'm not trying to use it on another project here), which I'm doing like this:

$ npm cache clean
$ git clone https://github.com/SlexAxton/yepnope.js.git
$ cd yepnope.js
$ git checkout v2.0     # this is the branch I want
$ npm install

But half way through the process I get something like this:

npm http GET https://registry.npmjs.org/nopt/-/nopt-2.1.1.tgz
npm http 200 https://registry.npmjs.org/wd/0.0.26
npm http GET https://registry.npmjs.org/wd/-/wd-0.0.26.tgz
npm ERR! not a package /var/folders/00/17q10000h01000cxqpysvccm004yw4/T/npm-13923/1363859875320-0.8848134819418192/tmp.tgz
npm http 304 https://registry.npmjs.org/uglify-js
npm ERR! Error: ENOENT, open '/var/folders/00/17q10000h01000cxqpysvccm004yw4/T/npm-13923/1363859875320-0.8848134819418192/package/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Darwin 12.2.1
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/<username>/code/yepnope.js
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.2.14
npm ERR! path /var/folders/00/17q10000h01000cxqpysvccm004yw4/T/npm-13923/1363859875320-0.8848134819418192/package/package.json
npm ERR! code ENOENT
npm ERR! errno 34

It still continues to the end, but ends with:

Extracting zip contents
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/<username>/code/yepnope.js/npm-debug.log
npm ERR! not ok code 0

The odd thing is, the npm ERR! not a package line occurs at a different place every time I try it (fresh repo clone every time) — maybe that's just because it fetches things asynchronously though?

I had a look at npm-debug.log and couldn't find anything too telling near the mentions of the path which is supposedly "not a package" - didn't really want to post the full file on here, but I'm happy to share chunks if someone can suggest what to look for.

Any ideas what's causing this to fail? Big thanks in advance!

like image 858
Stu Cox Avatar asked Mar 21 '13 15:03

Stu Cox


1 Answers

Some reasons why you are getting npm ERR! not a package :

  1. error in package description - example
  2. due to github repo link - example
like image 84
user568109 Avatar answered Sep 22 '22 13:09

user568109