yarn fails with Invalid URI

Created on 11 Oct 2016  ·  9Comments  ·  Source: yarnpkg/yarn

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)

Most helpful comment

Created #1591 to fix this, pending approval.

All 9 comments

+1 same problem

+1 same problem

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

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"

I will give this a shot.

Created #1591 to fix this, pending approval.

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

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

I also get the same error with v0.16.1

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

https://github.com/yarnpkg/yarn/pull/1775

Was this page helpful?
0 / 5 - 0 ratings