• Node 基本配置


    默认安装路径

    C:/用户/[用户名]/AppData/Roming/npm/node_meodules
    

    修改

    查看配置信息

    npm config ls
    

    创建文件夹并重新设置

    # win 
    npm config set prefix "D:software
    odejsmeodules
    pm"
    npm config set cache "D:software
    odejsmeodules
    pmcache"
    # linux
    npm config set prefix "/opt/software/node"
    npm config set cache "/opt/software/node/cache"
    

    下载的包信息

    cnpm

    npm install -g cnpm --registry=https://registry.npm.taobao.org	
    

    添加 npm 下载配置

    # 将淘宝镜像添加在本地配置中 以后直接使用该配置
    npm config set registry https://registry.npm.taobao.org
    # 仅本次下载使用淘宝的镜像
    npm --registry https://registry.npm.taobao.org install express
    

    配置后可通过下面方式来验证是否成功

    npm config get registry
    

    npm info express
    

    .npmrc

    registry=https://registry.npm.taobao.org
    sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
    phantomjs_cdnurl=http://cnpmjs.org/downloads
    electron_mirror=https://npm.taobao.org/mirrors/electron/
    sqlite3_binary_host_mirror=https://foxgis.oss-cn-shanghai.aliyuncs.com/
    profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
    chromedriver_cdnurl=https://cdn.npm.taobao.org/dist/chromedriver
    

    .yarnrc

    registry "https://registry.npm.taobao.org"
    sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
    phantomjs_cdnurl "http://cnpmjs.org/downloads"
    electron_mirror "https://npm.taobao.org/mirrors/electron/"
    sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
    profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
    chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"
    
  • 相关阅读:
    构造函数与析构函数2
    构造函数与析构函数(其中有两点值得学习)
    构造函数含有含默认值的参数
    A simple stack
    指针与const
    构造函数与析构函数
    构造函数的创建
    类的定义
    程序的堆与栈(转载)
    OpenStack 安装:glance 安装
  • 原文地址:https://www.cnblogs.com/iFanLiwei/p/12815113.html
Copyright © 2020-2023  润新知