• NodeJs 在window中安装使用


    Nodejs:

    官网下载长期版本zip格式解压

    D:Program Files
    odejs

    查看版本

    D:GitSpringBootDemo (master)                                                                                          
    $ node -v                                                                                                               
    v8.11.2                                                                                                                 
                                                                                                                            
    D:GitSpringBootDemo (master)                                                                                          
    $ npm -v                                                                                                                
    5.6.0  

    在此路径下建两个文件夹node_global和node_cache

    更改npm全局模块和cache默认安装位置

    D:GitSpringBootDemo (master)                                                                                          
    $  npm config set prefix "D:Program Files
    odejs
    ode_global"                                                          
                                                                                                                            
    D:GitSpringBootDemo (master)                                                                                          
    $  npm config set cache "D:Program Files
    odejs
    ode_cache"                                                            
                                                                                                                            
    D:GitSpringBootDemo (master)                                                                                          
    $  npm config get prefix                                                                                                
    D:Program Files
    odejs
    ode_global                                                                                     
                                                                                                                            
    D:GitSpringBootDemo (master)                                                                                          
    $ npm config get cache                                                                                                  
    D:Program Files
    odejs
    ode_cache   

    添加系统变量:

    Path添加:

    D:Program Files
    odejs
    D:Program Files
    odejs
    ode_global

    添加NODE_PATH

    D:Program Files
    odejs
    ode_global
    ode_modules

    淘宝镜像:

    D:Program Files
    $ npm config set registry https://registry.npm.taobao.org
    
    D:Program Files
    $ npm config get registry
    https://registry.npm.taobao.org/

    通过cnpm使用:

    D:Program Files
    $ npm install -g cnpm --registry=https://registry.npm.taobao.org
    npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
    D:Program Files
    odejs
    ode_globalcnpm -> D:Program Files
    odejs
    ode_global
    ode_modulescnpmincnpm
    + cnpm@6.0.0
    added 917 packages in 35.536s
    
    D:Program Files
    $ cnpm config get registry
    https://registry.npm.taobao.org/

    安装最常用express模块:

    D:GitSpringBootDemo (master)                                                                                          
    $ npm install express -g                                                                                                
    + express@4.16.3                                                                                                        
    added 50 packages in 6.291s                                                                                             
                                                                                                                            
    D:GitSpringBootDemo (master)                                                                                          
    $ npm root -g                                                                                                           
    D:Program Files
    odejs
    ode_global
    ode_modules    

    安装vue脚手架:

    D:Program Files
    $ npm install --global vue-cli
    npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
    D:Program Files
    odejs
    ode_globalvue -> D:Program Files
    odejs
    ode_global
    ode_modulesvue-cliinvue
    D:Program Files
    odejs
    ode_globalvue-list -> D:Program Files
    odejs
    ode_global
    ode_modulesvue-cliinvue-list
    D:Program Files
    odejs
    ode_globalvue-init -> D:Program Files
    odejs
    ode_global
    ode_modulesvue-cliinvue-init
    + vue-cli@2.9.6
    added 252 packages in 19.487s
    
    D:Program Files
    $ vue -V
    2.9.6

    安装vue-cli脚手架构建工具
    vue-cli 提供一个官方命令行工具,可用于快速搭建大型单页应用。该工具提供开箱即用的构建工具配置,带来现代化的前端开发流程。只需几分钟即可创建并启动一个带热重载、保存时静态检查以及可用于生产环境的构建配置的项目:

    $ npm install vue-cli -g

    安装webpack

     npm install webpack -g
     
     One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
     - webpack-cli (https://github.com/webpack/webpack-cli)
       The original webpack full-featured CLI.
     - webpack-command (https://github.com/webpack-contrib/webpack-command)
       A lightweight, opinionated webpack CLI.
    We will use "npm" to install the CLI via "npm install -D".
    Which one do you like to install (webpack-cli/webpack-command):
    
    npm install webpack-cli -g

    开始安装webpack提示必须安装webpack-cli,然后再次安装webpack-cli

    D:Git
    $ webpack -v
    4.11.0

    https://nodejs.org/zh-cn/download/

    https://blog.csdn.net/henery_002/article/details/78016575

    http://www.cnblogs.com/PeunZhang/p/5629329.html

    https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/001470969077294a6455fc9cd1f48b69f82cd05e7fa9b40000

    https://my.oschina.net/summerdays/blog/835233

    https://segmentfault.com/a/1190000007998600

    https://www.cnblogs.com/weiqinl/p/7503123.html

  • 相关阅读:
    springcloud
    redis实现Session
    深入理解Dip Ioc Di以及Ioc容器
    SQL Server 索引维护 索引碎片 填充因子
    SQL Server 非聚集索引的覆盖,连接交叉和过滤
    SQL Server 索引 聚集索引、非聚集索引、堆
    T-SQL存储过程
    T-SQl 批处理
    T-SQl 游标
    T-SQL 控制流语句
  • 原文地址:https://www.cnblogs.com/hongdada/p/9141368.html
Copyright © 2020-2023  润新知