Can't install any package with node npm

前端 未结 16 2247
一向
一向 2020-12-02 13:12

I\'m trying to install some node packages through npm, but it won\'t go. I\'ve already tried to install/unistall/update node, but nothing seems to work.

I\'m using u

16条回答
  •  囚心锁ツ
    2020-12-02 13:56

    This worked for me (not using proxy):

    1. set registry mirror for npm..

      npm config set registry http://skimdb.npmjs.com/registry

    found mirror from docs:https://docs.npmjs.com/misc/registry

    1. after this try npm install if it works then try to install whatever you want otherwise follow below steps as well

    3.npm install -g handlebar //i did because it was showing error in npm log but you can skip

    4.after that try to set again official registry

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

    5.now try to install whatever package you want :-)

提交回复
热议问题