Publishing NPM packages to Sonar Nexus Type Repo

66 Views Asked by At

I'm new to using Nexus Repository Manager, specifically the npm proxy feature, and I'm facing issues when trying to publish my npm artifacts to a Nexus npm proxy repository.

Here's the situation:

During my project build, I successfully fetched artifacts from the official npm registry (https://registry.npmjs.org/) and cached them in my Nexus npm proxy repository. This part works fine.

However, when I attempt to publish my own npm package from my local environment to my Nexus npm proxy repository, I encounter the following error:

npm notice total files:   2705                                    
npm notice 
npm ERR! code E404
npm ERR! 404 Not Found - PUT http://<ip>:8079/repository/test-npm-repo-proxy/@wave%2fapp-runtime
npm ERR! 404 
npm ERR! 404  '@wave/[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-09-22T04_57_30_721Z-debug.log

Here are the steps I've taken so far to configure npm and Nexus:

I've set the npm registry to point to my Nexus npm proxy repository using the command:

for setting registry

npm config set registry http://ip:8079/repository/test-npm-repo-proxy/

To configure user authentication, I've generated an authorization token for my admin user using:

echo -n 'admin:admin@123' | openssl base64

and then set it in npm as follows:

npm config set _auth <auth_token>

Despite these configurations, I'm still encountering the 404 error when trying to publish. Can someone please help me identify what I might be missing or guide me on how to resolve this issue? Any assistance would be greatly appreciated. Thank you in advance!

0

There are 0 best solutions below