Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

NPM does not respect linked modules as source #17153

Open
StarpTech opened this issue Jun 12, 2017 · 4 comments
Open

NPM does not respect linked modules as source #17153

StarpTech opened this issue Jun 12, 2017 · 4 comments

Comments

@StarpTech
Copy link

I have two packages and both depends on each other. I don't want to publish it on NPM. I can't install any package because they could not be found in the registry. I expect that NPM checks linked modules as installation source before it throws an error

NPM 5.0.3
NodeJs: 8.1.0

@racedale
Copy link

racedale commented Jul 28, 2017

I am having the same problem with NPM 5.3.0 and Node 8.2.1 installed through NVM. Works fine if I use NVM to switch back to my previous version which is Node 7.10.1 and NPM 4.2.0.

NPM 5 seems to do the linking correctly, but when you run an npm install afterwards it throws a 404 error. NPM 5 is still trying to fetch from registry.npmjs.org even though the package is linked locally.

Attached a log file. The package I have linked locally is called @racedale/localPackage for test purposes.
2017-07-28T15_30_01_191Z-debug.log.zip

@serkandurusoy
Copy link

Exact same issue. On node 8.2.1 and npm 5.3.0 using nvm. npm link outputs correct link information, everything seems in place, although npm i results in 404 error.

@serut
Copy link

serut commented Dec 13, 2017

Same issue here. This is the only issue we have that prevents us to migrate from 7.10 to the current one.

@serut
Copy link

serut commented Jan 11, 2018

@iarna I don't think this is a feature, as this behavior was working on npm4 and not anymore on npm5.
Our repository is opensource if someone wants to give a try.

$ git clone ...
$ npm run bootstrap # it runs some npm link
/usr/local/lib/node_modules/@regardsoss-modules/aip-status -> /app_to_build/web_modules/modules/aip-status
/app_to_build/node_modules/@regardsoss-modules/aip-status -> /usr/local/lib/node_modules/@regardsoss-modules/aip-status -> /app_to_build/web_modules/modules/aip-status
npm up to date in 0.085s
notice created a lockfile as package-lock.json. You should commit this file.
...
$ npm install # it fails on npm5 and not on npm4
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! code E404
npm ERR! 404 Not Found: @regardsoss-modules/aip-status@0.0.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants