yarn icon indicating copy to clipboard operation
yarn copied to clipboard

[DEP0170] DeprecationWarning: The URL ssh://[email protected]:XXXX/YYYYY.git is invalid.

Open earonesty opened this issue 1 year ago • 1 comments

Node changed their Url.parse command.

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

(node:56977) [DEP0170] DeprecationWarning: The URL ssh://[email protected]: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: https://github.com/npm/npm-package-arg/pull/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.

earonesty avatar Sep 10 '24 15:09 earonesty

Looks like some will switch away from yarn when this will hit as error from Node side.

Faq avatar Apr 07 '25 18:04 Faq