Skip to content

[DEP0170] DeprecationWarning: The URL ssh://git@github.com:XXXX/YYYYY.git is invalid.  #9097

Open
@earonesty

Description

@earonesty

Node changed their Url.parse command.

https://nodejs.org/api/deprecations.html#DEP0170

(node:56977) [DEP0170] DeprecationWarning: The URL ssh://git@github.com:XXXXXX/YYYYY.git is invalid. Future versions of Node.js will throw an error.
    at getHostname (node:url:516:17)
    at Url.parse (node:url:384:14)
    at urlParse (node:url:141:13)
    at GitResolver.<anonymous> (/home/erik/.nvm/versions/node/v20.11.1/lib/node_modules/yarn/lib/cli.js:37285:19)
    at Generator.next (<anonymous>)
    at step (/home/erik/.nvm/versions/node/v20.11.1/lib/node_modules/yarn/lib/cli.js:310:30)
    at /home/erik/.nvm/versions/node/v20.11.1/lib/node_modules/yarn/lib/cli.js:328:14
    at new Promise (<anonymous>)
    at new F (/home/erik/.nvm/versions/node/v20.11.1/lib/node_modules/yarn/lib/cli.js:5539:28)
    at GitResolver.<anonymous> (/home/erik/.nvm/versions/node/v20.11.1/lib/node_modules/yarn/lib/cli.js:307:12)

To fix this issue, npm changed their resolver not to use Url.parse: npm/npm-package-arg#141. Yarn 1 could do the same.

In future versions of node, yarn 1 will cease working for git urls of this kind - unless an alternate parser is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions