Using NPM to install dependencies, including one that is stored in Verdaccio running locally.
Somehow NPM is stuck attempting to load the Verdaccio dependency from localhost even though the command to install from the corrected location has been run npm install --save --registry http://CORRECT-URL ...
Using rm -rf node_modules package-lock.json and removing the dependency from package.json, then running the install again - still DOES NOT WORK. Every time the install command completes, package-lock.json STILL uses localhost to resolve the registry.
Removing localhost from ~/.npmrc and running npm set registry http://CORRECT-URL also didn't help.
Please help. Where is NPM remembering localhost and insisting on using it???
UPDATE - Using npm install -ddd
Attempted to use npm install -ddd to see where npm is picking up the package. The output shows the CORRECT-URL, but when it is done, package-lock.json still lists localhost.
Note all of the following:
- Removed all references to the PACKAGE from
package.jsonandpackage-lock.json - Verified no references to
localhostin either file - Removed
node_modules/PACKAGE_DIRwithrm -rf - Removed PACKAGE from
node_modules/.package-lock.json - Searched for
.npmrcandnpmrcin the build tree and found two empty files:- node/node_modules/npm/docs/public/configuring-npm/npmrc
- node/node_modules/npm/.npmrc
- ~/.npmrc has 2 entries for the CORRECT_URL in the following forms:
- //:/:_authToken="<AUTH_TOKEN>"
- registry=http://:/