zoukankan      html  css  js  c++  java
  • 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"
    
  • 相关阅读:
    PHP里文件的查找方式及写法
    上传文件
    用ajax对数据进行查看人员信息
    ajax实现分页
    jquery做个日期选择适用于手机端
    PHP用ajia代码写三级联动下拉
    JSON数据的定义
    jquery做一些小的特效
    对jquery操作复选框
    使用 LUT 模拟光照
  • 原文地址:https://www.cnblogs.com/iFanLiwei/p/12815113.html
Copyright © 2011-2022 走看看