Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn fails with Invalid URI #639

Closed
joeheyming opened this issue Oct 11, 2016 · 9 comments
Closed

yarn fails with Invalid URI #639

joeheyming opened this issue Oct 11, 2016 · 9 comments

Comments

@joeheyming
Copy link

I just installed yarn and ran it in my local npm repository.

It fails on file: uris:

yarn install v0.15.1
info No lockfile found.
[1/4] πŸ” Resolving packages...
β   toposort@^1.0.0events.js:154
throw er; // Unhandled 'error' event
^

Error: Invalid URI "file:target/my-package.tgz"
at Request.init (/usr/local/lib/node_modules/yarnpkg/node_modules/request/request.js:275:31)
at new Request (/usr/local/lib/node_modules/yarnpkg/node_modules/request/request.js:129:8)
at request (/usr/local/lib/node_modules/yarnpkg/node_modules/request/index.js:55:10)
at RequestManager.execute (/usr/local/lib/node_modules/yarnpkg/lib/util/request-manager.js:302:17)
at RequestManager.shiftQueue (/usr/local/lib/node_modules/yarnpkg/lib/util/request-manager.js:328:10)
at /usr/local/lib/node_modules/yarnpkg/lib/util/request-manager.js:230:12
at Request.params.callback as _callback
at Request.self.callback (/usr/local/lib/node_modules/yarnpkg/node_modules/request/request.js:187:22)
at emitTwo (events.js:100:13)
at Request.emit (events.js:185:7)

@smilingpoplar
Copy link

+1 same problem

1 similar comment
@hanjukim
Copy link

+1 same problem

@changero
Copy link

error %27http://react: Invalid URI "%27http://react"

@vesteraas
Copy link

I'm experiencing the same issue.

This fails:

"angular2-materialize": "file:angular2-materialize-5.2.1.tgz"

...but this works fine in yarn, as well as npm:

"angular2-materialize": "./angular2-materialize-5.2.1.tgz"

@akshbn
Copy link

akshbn commented Oct 29, 2016

I will give this a shot.

akshbn added a commit to akshbn/yarn that referenced this issue Oct 30, 2016
@sebmck
Copy link
Contributor

sebmck commented Nov 1, 2016

Created #1591 to fix this, pending approval.

@joeheyming
Copy link
Author

Wait, @kittens #1591 says to remove the file: suffix, don't you mean file: prefix?

I just tried out yarn with v0.16.1 and I still get the invalid uri error

@shahmirn
Copy link
Contributor

shahmirn commented Nov 8, 2016

I agree with @joeheyming that the code should be using removePrefix, not removeSuffix

I also get the same error with v0.16.1

@shahmirn
Copy link
Contributor

@joeheyming @kittens I submitted a PR to change the code from removeSuffix to removePrefix

#1775

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

No branches or pull requests

9 participants