Installing npm package fails with 404

后端 未结 11 1065
自闭症患者
自闭症患者 2020-12-10 11:35

Using the command prompt, I am trying to install angular CLI and it fails. I have npm version 5.5.1 and node version v8.9.1. I am trying to install angular cli using the com

相关标签:
11条回答
  • 2020-12-10 11:37

    Add a .npmrc file in the root of the project. .npmrc will look like below -

    @xy:registry=https://xyz.jfrog.io/xyz/api/npm/npm-local/ @xy-app:registry=https://xyz.jfrog.io/xyz/api/npm/npm-local/

    And Delete all the field eg - email , auth etc. Find out what is the registry url of your application and put it into the registry.

    Then run command - npm install And it will work.

    0 讨论(0)
  • 2020-12-10 11:39
    npm config set registry http://registry.npmjs.org
    

    NPM registry documentation

    0 讨论(0)
  • 2020-12-10 11:43
    1. change your access level to public. type this in the terminal
    npm --access=public
    
    1. install your angular.
    sudo npm install @ngular/cli
    
    0 讨论(0)
  • 2020-12-10 11:45

    Try first this commands (in windows run as administrator)

    npm config set registry http://registry.npmjs.org
    npm install -g @angular/cli
    

    if still not working let's update NPM and nodejs by running this commands

    npm -g install npm
    npm cache clean -f
    npm install -g n
    

    then try to run

    npm install -g @angular/cli
    

    This should solve this problem

    0 讨论(0)
  • 2020-12-10 11:48

    In my case, that's a typo error:
    change trct-js-sdk to trtc-js-sdk saved my life.

    0 讨论(0)
  • 2020-12-10 11:55

    in my case it was .npmrc file in my project dir, which kept overwriting my global registry url. As soon as I deleted it, I could finally use npm install

    0 讨论(0)
提交回复
热议问题