We have our own npm package and a project that uses it, I want to publish it to a tfs feed - repository and install it from there instead of from a physical file.
I published the package to the feed from my development machine,
and I changed the reference within the project that consumes it.
The whole process works fine from my machine, but when I try to consume the package on a build process in the tfs - it fails with the error :
Unable to authenticate, your authentication token seems to be invalid.
I've created .npmrc
file at the project level with the registry address, and another file with credentials on the user directory, and I did the same on the TFS machine.
What can cause the npm install (from my feed) to not work on the tfs machine?
EDIT:
When I add prefix @my to the registry at the user-level .npmrc file - like this:
@my:registry=https://my-feed-address
The error changes to: "No valid versions available for my-package"
On the command line, type the npm login --auth-type=web command. When prompted hit "ENTER" to open your browser to start the login flow or click the provided URL show in the command line. Log in to npm with your user account. Click on Use security key and follow the browser specific steps to authenticate.
The error in NPM, 'error package install failed, see above', can occur when the user creates a new project in Angular using Node. js using VS code. This means that NPM is corrupted in your system, and must reinstall NPM.
npm install -g vsts-npm-auth
vsts-npm-auth -config .npmrc
Create a file .npmrc
in your project folder and add the following
registry=Your URL
always-auth=true
In the command prompt run both of these commands
npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false
vsts-npm-auth -config .npmrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With