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

2

5

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!

Headset answered 21/3, 2013 at 15:12 Comment(0)
O
9

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

  1. error in package description - example
  2. due to github repo link - example
Of answered 21/3, 2013 at 16:0 Comment(2)
Any ideas how I can pinpoint which package is causing it? As I say, that line gets thrown in after a different package every time I try.Headset
take a look inside the file being shown in the log /var/folders/00/17q10000h01000cxqpysvccm004yw4/T/npm-13923/1363859875320-0.8848134819418192/tmp.tgz. Most likely its the one package causing problem.Of
E
0

regarding @user568109 checklist: in case you are not sure if there are any errors in your package.json file, just paste it to http://jsonlint.com.

Esperanzaespial answered 11/9, 2013 at 19:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.