windows+node+vue

 

一、环境
1、os:win 10
2、node:node-v12.5.0-x64
3、npm:6.9.0
4、vue:2.9.6
5、Windows PowerShell
二、安装提示
1、环境检测
    -> npm -v 【版本确认】
    -> npm config list -l 【环境配置】
    -> npm list -g -depth 0 【已安装组件】
    -> npm cache clean -f 【强制(force)清除缓存,避免干扰】
2、逃坑策略【非常有效】
(1)如果安装过程中,出现错误提示,则:
    -> clean后再install,可能重复两三次。
    -> 换如下代理试试,重复上条。
    【npm config set registry https://registry.npm.taobao.org】
    【npm config set registry http://registry.cnpmjs.org】
(2)安装成功后,务必查看是否已经安装成功。
    -> npm list -g -depth 0
(3)代理管理
    -> npm config set proxy null
    -> npm config set https-proxy null
(4)包安装路径
    -> 全局安装请使用参数:-g。
    -> 单项目安装,至项目根文件夹:npm install webpack --save-dev
3、安装步骤
(1)proxy:
    -> npm config set registry https://registry.npm.taobao.org
(2)webpack:
    -> npm install webpack -g
(3)webpack-cli:
    -> npm install webpack-cli -g
(4)webpack-dev-server:
    -> npm install webpack-dev-server -g
(5)eslint:
    -> npm install eslint –g
    -> 【非必须】eslint -v
    -> 【非必须】eslint --init 【注意是--】
    -> 【非必须】npm install eslint-plugin-vue -g
(6)coffee-script:
    -> npm install coffee-script -g 【需要cnpmjs】
    -> 【非必须】npm info underscore
3、安装vue
    -> npm install vue-cli -g
    -> 【非必须,注意:V要大写】vue -V 
4、创建项目
    -> vue init webpack HelloVue
    ? Project name hellovue
    ? Project description A Vue.js project
    ? Author
    ? Vue build standalone
    ? Install vue-router? Yes
    ? Use ESLint to lint your code? No 【ESLint选为yes会出错】
    ? Set up unit tests Yes
    ? Pick a test runner jest
    ? Setup e2e tests with Nightwatch? No 【Nightwatch选为yes会出错】
5、运行项目
    -> npm run dev
    -> http://localhost:8080/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值