typescriptnpmaws-codeartifact

How to configure npm back to npm default registory?


I created an npm package (using typescript and node18 ) and uploaded it to Code Artifact and connected npm to the private registry.

Now I am working on another project and I find the following error whenever I try to commit:

npm ERR! code E401 npm ERR! Unable to authenticate, your authentication token seems to be invalid. npm ERR! To correct this please trying logging in again with: npm ERR! npm login

If I try npm login I get the following error

npm ERR! code ENYI npm ERR! Web login not supported

How can I return npm back to its default registry ?


Solution

  • I used the following command and my problem was resolved

    npm config set registry https://registry.npmjs.org/