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

Invalid dependency format can result in EMISSINGARG #9433

Closed
jamietre opened this issue Aug 28, 2015 · 2 comments
Closed

Invalid dependency format can result in EMISSINGARG #9433

jamietre opened this issue Aug 28, 2015 · 2 comments

Comments

@jamietre
Copy link
Contributor

Not a high priority but caused some confusion for a while, e.g.

"devDependencies": {
  "babel-core": "npm:babel-core@^5.1.13"
}.

will result in

> npm install
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "...\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm  v3.3.0
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #3
npm ERR! typeerror     at exports.findRequirement (...\npm\node_modules\npm\lib\install\deps.js:475:3)
npm ERR! typeerror   .. (etc)

This was a JSPM format dependency that I didn't fix properly. I would expect it to give an error more like how

"devDependencies": {
  "babel-core": "foobar"
}.

results in...

> npm install
npm ERR! No compatible version found: babel-core@foobar
npm ERR! Valid install targets:
npm ERR! ["5.8.23","5.8.22","5.8.21" ...]
@othiym23 othiym23 added this to the 3.x milestone Aug 28, 2015
@othiym23
Copy link
Contributor

Yeah, this error message isn't ideal, but it's also not a bug, per se, so a patch to return a better error message in this case would be appreciated.

@iarna
Copy link
Contributor

iarna commented Oct 13, 2015

This was fixed a week or two ago! You should now get this instead:

npm ERR! Unsupported URL Type: npm:babel-core@^5.1.13

@iarna iarna closed this as completed Oct 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants