Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported URL Type "link:" while using NPM

Tags:

npm

Following some guidance on the net, I edited my package.json to include a link URL:

...
"dependencies": {
  ...
  "react": "link:../some-other-module/node_modules/react",
}

But when installing, I get the following error:

$ npm install
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "link:": link:../some-other-module/node_modules/react
like image 921
philippe_b Avatar asked Sep 06 '25 19:09

philippe_b


1 Answers

This is because link has been replaced with file in recent versions of NPM. Simply update your package.json:

...
"dependencies": {
  ...
  "react": "file:../some-other-module/node_modules/react",
}
like image 79
philippe_b Avatar answered Sep 11 '25 14:09

philippe_b