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

Unable to install package.json module #13786

Closed
1 of 4 tasks
pdehaan opened this issue Aug 28, 2016 · 4 comments
Closed
1 of 4 tasks

Unable to install package.json module #13786

pdehaan opened this issue Aug 28, 2016 · 4 comments

Comments

@pdehaan
Copy link

pdehaan commented Aug 28, 2016

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

I'm trying to install [the poorly named] package.json module, and it's throwing errors:

How can the CLI team reproduce the problem?

$ npm i package.json -S

OUTPUT: (click to expand)

npm ERR! not a package /Users/pdehaan/dev/tmp/del/pkgjson-test/package.json
npm ERR! addLocal Could not install /Users/pdehaan/dev/tmp/del/pkgjson-test/package.json
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/pdehaan/.nvm/versions/node/v6.3.0/bin/node" "/Users/pdehaan/.nvm/versions/node/v6.3.0/bin/npm" "i" "package.json" "-S"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.3
npm ERR! path /var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69552-1140e3d9/unpack-551ab048/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69552-1140e3d9/unpack-551ab048/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69552-1140e3d9/unpack-551ab048/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/pdehaan/dev/tmp/del/pkgjson-test/npm-debug.log

npm-debug.log (click to expando)

0 info it worked if it ends with ok
1 verbose cli [ '/Users/pdehaan/.nvm/versions/node/v6.3.0/bin/node',
1 verbose cli   '/Users/pdehaan/.nvm/versions/node/v6.3.0/bin/npm',
1 verbose cli   'i',
1 verbose cli   'package.json',
1 verbose cli   '-S' ]
2 info using npm@3.10.3
3 info using node@v6.3.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData package.json
8 silly fetchOtherPackageData package.json
9 silly cache add args [ 'package.json', null ]
10 verbose cache add spec package.json
11 silly cache add parsed spec Result {
11 silly cache add   raw: 'package.json',
11 silly cache add   scope: null,
11 silly cache add   escapedName: 'package.json',
11 silly cache add   name: null,
11 silly cache add   rawSpec: 'package.json',
11 silly cache add   spec: '/Users/pdehaan/dev/tmp/del/pkgjson-test/package.json',
11 silly cache add   type: 'local' }
12 silly addLocalTarball shasum (computed) 34e4a025445f12b7b93029e6dcd0884d2b98fec9
13 verbose addTmpTarball /Users/pdehaan/dev/tmp/del/pkgjson-test/package.json not in flight; adding
14 verbose correctMkdir /Users/pdehaan/.npm correctMkdir not in flight; initializing
15 verbose addTmpTarball validating metadata from /Users/pdehaan/dev/tmp/del/pkgjson-test/package.json
16 verbose tar unpack /Users/pdehaan/dev/tmp/del/pkgjson-test/package.json
17 verbose tar unpacking to /var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137
18 silly gentlyRm /var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137 is being purged
19 verbose gentlyRm don't care about contents; nuking /var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137
20 silly gunzTarPerm modes [ '755', '644' ]
21 error not a package /Users/pdehaan/dev/tmp/del/pkgjson-test/package.json
22 error addLocal Could not install /Users/pdehaan/dev/tmp/del/pkgjson-test/package.json
23 silly fetchPackageMetaData Error: ENOENT: no such file or directory, open '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137/package.json'
23 silly fetchPackageMetaData     at Error (native)
23 silly fetchPackageMetaData  error for package.json { Error: ENOENT: no such file or directory, open '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137/package.json'
23 silly fetchPackageMetaData     at Error (native)
23 silly fetchPackageMetaData   errno: -2,
23 silly fetchPackageMetaData   code: 'ENOENT',
23 silly fetchPackageMetaData   syscall: 'open',
23 silly fetchPackageMetaData   path: '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137/package.json' }
24 silly rollbackFailedOptional Starting
25 silly rollbackFailedOptional Finishing
26 silly runTopLevelLifecycles Starting
27 silly runTopLevelLifecycles Finishing
28 silly install printInstalled
29 verbose stack Error: ENOENT: no such file or directory, open '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137/package.json'
29 verbose stack     at Error (native)
30 verbose cwd /Users/pdehaan/dev/tmp/del/pkgjson-test
31 error Darwin 15.6.0
32 error argv "/Users/pdehaan/.nvm/versions/node/v6.3.0/bin/node" "/Users/pdehaan/.nvm/versions/node/v6.3.0/bin/npm" "i" "package.json" "-S"
33 error node v6.3.0
34 error npm  v3.10.3
35 error path /var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137/package.json
36 error code ENOENT
37 error errno -2
38 error syscall open
39 error enoent ENOENT: no such file or directory, open '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137/package.json'
40 error enoent ENOENT: no such file or directory, open '/var/folders/qc/g_f0szh95k1fzph34rhmf5jw0000gp/T/npm-69673-4270e319/unpack-fc030137/package.json'
40 error enoent This is most likely not a problem with npm itself
40 error enoent and is related to npm not being able to find a file.
41 verbose exit [ -2, true ]
### supporting information: - `npm -v` prints: 3.10.3 - `node -v` prints: v6.3.0 - `npm config get registry` prints: https://registry.npmjs.org/ - Windows, OS X, or Linux?: OS X
@pdehaan
Copy link
Author

pdehaan commented Aug 28, 2016

Workaround is to seemingly install from GitHub:

$ npm i IonicaBizau/package.json -S

Results in:

{
  "name": "pkgjson-test",
  "version": "1.0.0",
  ...
  "dependencies": {
    "package.json": "github:ionicabizau/package.json"
  }
}

@kenany
Copy link
Contributor

kenany commented Aug 28, 2016

Alternatively:

$ npm install package.json@latest

@kenany
Copy link
Contributor

kenany commented Aug 28, 2016

Actually I guess this is basically a duplicate of #12455. @othiym23's comment is probably still the current stance on this particular package.

@pdehaan
Copy link
Author

pdehaan commented Aug 29, 2016

Yeah, sounds like a dupe [of #12455] to me, thanks!

@pdehaan pdehaan closed this as completed Aug 29, 2016
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