question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] yarn add fails by specifying the remote URL

See original GitHub issue
  • I’d be willing to implement a fix

Describe the bug

After calling yarn add <git remote url> error is thrown: Invalid descriptor. For example:

yarn add https://github.com/fancyapps/fancybox
Internal Error: Invalid descriptor (https://github.com/fancyapps/fancybox)
    at Object.parseDescriptor (/mnt/c/Users/pas/dev/admin-app/.yarn/releases/yarn-sources.js:48444:26)
    at /mnt/c/Users/pas/dev/admin-app/.yarn/releases/yarn-sources.js:84576:31
    at Array.map (<anonymous>)
    at AddCommand.execute (/mnt/c/Users/pas/dev/admin-app/.yarn/releases/yarn-sources.js:84571:60)
    at async AddCommand.validateAndExecute (/mnt/c/Users/pas/dev/admin-app/.yarn/releases/yarn-sources.js:55036:26)
    at async Cli.run (/mnt/c/Users/pas/dev/admin-app/.yarn/releases/yarn-sources.js:51907:24)
    at async Cli.runExit (/mnt/c/Users/pas/dev/admin-app/.yarn/releases/yarn-sources.js:51916:28)

To Reproduce yarn add <git remote URL> e.g.: yarn add https://github.com/fancyapps/fancybox

Environment if relevant (please complete the following information):

  • Node version v12.13.0
  • Yarn version 2.0.0-rc.29.git.20200223.fbd94ea8

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

17reactions
arcaniscommented, May 14, 2020

You’re missing the package name:

yarn add <package name>@git+ssh://<git remote URL>#semver:^3.2.0

We only infer the package name from local directories at the moment.

3reactions
arcaniscommented, Feb 27, 2020

Manually specify the package name: yarn add fancybox@fancyapps/fancybox

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Codes | Yarn - Package Manager
This error means that this process failed and Yarn cannot successfully figure out which version of the package should be added to your...
Read more >
The unauthenticated git protocol on port 9418 is no longer ...
I have been using github actions for quite sometime but today my deployments started failing. Below is the error from github ...
Read more >
npm Registry - JFrog - JFrog Documentation
Specify the URL to the remote registry in the URL field. ... npm login will fail as the user is not registered in...
Read more >
Troubleshooting Node.js Deploys - Heroku Dev Center
AWS Proxy Error ... Setting the HTTP_PROXY or HTTPS_PROXY environment variables in the app's build will cause these types of failures. If the ......
Read more >
npm packages in the Package Registry - GitLab Docs
When you install a package without specifying the tag or version, the latest tag is used. ... Due to a bug in npm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found