npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Is `link:` or `file:` supported?

I myself bumped into an issue when using pnpm and testing with npm, as in here. Subsequently I discovered the discussion on npm here which seems to suggest file: is soft-deprecated, and link: is now supported. Yet, in practice (tested with npm 5.6.0, 6.4.0), the opposite seems to be true. npm install works fine for file:, but throws a

npm ERR! Unsupported URL Type "link:": link:X   

with link:.

I was unable to find official documentation on the subject.

This is not a bug, and the bug template is not optional. link: is not supported. It’s Yarn’s invention. It should work fine if you replace your link: with file: since those will do the same thing on npm@>=5.