-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 install Invalid protocol error #1625
Comments
Need more information to reproduce this like the |
What's weird is that it worked when I ran yarn in another project on the same machine, then came back and ran yarn again on this project and it worked. It's happened twice, both on fresh GCE instances. |
I couldn't reproduce, works fine with |
It still reproduce for me.
Node: 6.9.1 |
I also get this same error, on a debian jessie docker container. Doesn't happen on macOS El Capitan for some reason.
yarn 0.18.0 |
In case this helps anyone, I ran into this when testing a migration from npm to yarn and running CI on travis. I was able to work around the problem by changing our dependency references in node 6.3.0 |
I guess the problem is more troublesome when one does not have control over that, say, when a package has a dependency written as |
I found a temporary fix. Delete the yarn.lock file when trying to run on a new machine. Yarn will generate another one. |
@shkfnly kinda defeats the purpose though. The idea of using a lock file is to make sure you always have the same dependencies |
I'm noticing this as well |
Same issue. Running yarn 0.19.1 and node 7.4.0 on macOS and Ubuntu Linux. Deleting
|
finally got repro steps for this:
that produces a
which for whatever reason produces the error.
/shrug |
Hi, I got this error too on yarn v0.24.6. Any idea about this ? |
Hi, got the same issue on v0.23.. I upgraded to v0.24.6 but got same issue. I'm unsure of what info I should provide, but this is the last lines of yarn-error.log
|
Deleted yarn.lock and everything works fine. |
Keep running into this setting up new devs. Deleting Has anyone else found a different workaround? |
One thing that worked for us was to:
|
We just inherited a project that uses Yarn so I installed it today and we are seeing this error. I agree that deleting the lock file is not an acceptable solution. I see a commit was merged on July 13th. Was that supposed to fix the issue? |
If it helps find this bug, I ran into this when using a git submodule and trying to run I was able to copy the Currently my workaround is ok for me, but ideally would be great if there's a solution to this bug. Cheers! |
**Summary** Yarn can not handle the `git+https://` dependency format correctly, as described for various versions in #1625. The problem is present in Yarn 1.2.1. A related problem for `git+ssh://` has been described in #573 and fixed in #3425. This PR extends the solution from #3425 to use the Git fetcher for any [Git-over-protocol](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) URLs. **Test plan** Extended the `package-request` unit tests to verify that the correct remote type (git) is used for `git+https://`, while the tarball remote type continues to be used for regular HTTP(S) URLs.
…g#4759) **Summary** Yarn can not handle the `git+https://` dependency format correctly, as described for various versions in yarnpkg#1625. The problem is present in Yarn 1.2.1. A related problem for `git+ssh://` has been described in yarnpkg#573 and fixed in yarnpkg#3425. This PR extends the solution from yarnpkg#3425 to use the Git fetcher for any [Git-over-protocol](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) URLs. **Test plan** Extended the `package-request` unit tests to verify that the correct remote type (git) is used for `git+https://`, while the tarball remote type continues to be used for regular HTTP(S) URLs.
this worked for me:
|
upgrade yarn to latest version and everything works fine. |
Tried deleting yarn.lock file, it now requires a yarn install, cannot yarn install as it hits the same error.... error An unexpected error occurred: "Invalid protocol: localhost:". |
Closing this. If this is is still an issue on 1.21.1, please comment and I'll reopen. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Running yarn on a new system gives me this error:
If the current behavior is a bug, please provide the steps to reproduce.
Running yarn on a new system
What is the expected behavior?
Install successfully
Please mention your node.js, yarn and operating system version.
Node: 6.9.1
Yarn: 0.16.0
OS: CentOS 6.8
The text was updated successfully, but these errors were encountered: