npm相关操作

作者: ZZES_ZCDC | 来源:发表于2017-11-29 10:47 被阅读33次

    操作环境: windows10 ,NodeJS v8.3.0,NPM v5.3.0

    1.查看基本配置

    npm config list
    
    图片.png

    2.查看完整配置

    npm config ls -l
    
    图片.png

    3.代理

    代理地址以自己为主

    配置:npm config set proxy=http://127.0.0.1:1080
    删除:npm config delete proxy
    

    4.镜像地址registry

    配置:npm config set registry= http://registry.cnpmjs.org
    删除:npm config delete registry
    

    5.node-sass、electron 和 phantomjs安装缓慢

    https://github.com/lmk123/blog/issues/28

    6.安装sha错误

    • 删除node_modules
    • npm cache clean --force
    • npm cache verify 查看是否清理

    7.使用nrm管理镜像地址

    npm install -g nrm
    

    相关文章

      网友评论

        本文标题:npm相关操作

        本文链接:https://www.haomeiwen.com/subject/qnqubxtx.html