提前在E:\nodejs文件夹下建立node_gobal和node_cache

并配置环境变量NODE_PATH:E:\nodejs\node_global\node_modules

改变用户变量中的C:\Users\11872\AppData\Roaming\npm为 E:\nodejs\node_global

打开cmd

C:\Users\11872>npm config set prefix "E:\nodejs\node_global"

C:\Users\11872>npm config set cache "E:\nodejs\node_cache"

C:\Users\11872>npm config set registry=http://registry.npm.taobao.org

上面三步执行完成后,到用户 C:\Users\你的用户名\.npmrc查看是否存在上面三个指令

接着执行

C:\Users\11872>npm install webpack -g
E:\nodejs\node_global\webpack -> E:\nodejs\node_global\node_modules\webpack\bin\webpack.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\webpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ webpack@4.35.0
added 324 packages from 199 contributors in 66.87s

C:\Users\11872>npm install webpack-cli -g
E:\nodejs\node_global\webpack-cli -> E:\nodejs\node_global\node_modules\webpack-cli\bin\cli.js
npm WARN webpack-cli@3.3.5 requires a peer of webpack@4.x.x but none is installed. You must install peer dependencies yourself.

+ webpack-cli@3.3.5
added 206 packages from 130 contributors in 26.024s

C:\Users\11872>webpack -v
4.35.0

C:\Users\11872>npm install vue-cli -g
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
E:\nodejs\node_global\vue -> E:\nodejs\node_global\node_modules\vue-cli\bin\vue
E:\nodejs\node_global\vue-init -> E:\nodejs\node_global\node_modules\vue-cli\bin\vue-init
E:\nodejs\node_global\vue-list -> E:\nodejs\node_global\node_modules\vue-cli\bin\vue-list
+ vue-cli@2.9.6
added 239 packages from 206 contributors in 65.166s

C:\Users\11872>vue -V     检查vue-cli版本号 vue -V ,此处V为大写  

切换到存放vue项目的盘符下

C:\Users\11872>e:

E:\>cd test

E:\test>vue init webpack myvue

? Project name myvue
? Project description A Vue.js project
? Author 1187253007 <1187253007@qq.com>
? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? No
? Set up unit tests Yes
? Pick a test runner jest
? Setup e2e tests with Nightwatch? Yes
? Should we run `npm install` for you after the project has been created? (recommended) npm

vue-cli · Generated "myvue".

# Installing project dependencies ...
# ========================

npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
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

> chromedriver@2.46.0 install E:\test\myvue\node_modules\chromedriver
> node install.js

Current existing ChromeDriver binary is unavailable, proceding with download and extraction.
Downloading from file: https://chromedriver.storage.googleapis.com/2.46/chromedriver_win32.zip
Saving to file: C:\Users\11872\AppData\Local\Temp\2.46\chromedriver\chromedriver_win32.zip
Received 781K...
Received 1568K...
Received 2352K...
Received 3136K...
Received 3920K...
Received 4523K total.
Extracting zip contents
Copying to target path E:\test\myvue\node_modules\chromedriver\lib\chromedriver
Done. ChromeDriver binary available at E:\test\myvue\node_modules\chromedriver\lib\chromedriver\chromedriver.exe

> core-js@2.6.9 postinstall E:\test\myvue\node_modules\core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> uglifyjs-webpack-plugin@0.4.6 postinstall E:\test\myvue\node_modules\webpack\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1521 packages from 1065 contributors and audited 31308 packages in 335.245s
found 84 vulnerabilities (65 low, 8 moderate, 10 high, 1 critical)
run `npm audit fix` to fix them, or `npm audit` for details

# Project initialization finished!
# ========================

To get started:

cd myvue
npm run dev

Documentation can be found at https://vuejs-templates.github.io/webpack

E:\test>cd myvue

E:\test\myvue>npm run dev

> myvue@1.0.0 dev E:\test\myvue
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

12% building modules 19/27 modules 8 active ...ate&index=0!E:\test\myvue\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "bab 95% emitting

DONE Compiled successfully in 3785ms 6:17:03 PM

I Your application is running here: http://localhost:8080

vue-cli vue脚手架搭建步骤的更多相关文章

  1. 【vue】---- 新版脚手架搭建项目流程详解

    一.概述 本文将介绍vue项目完整的搭建流程,在使用新版本的脚手架基础上,进行了一系列的完善和配置.主要内容如下: 1.项目初始化 安装脚手架 创建项目 项目结构 2.项目搭建配置 引入第三方插件 路 ...

  2. vue cli & vue 3.x

    vue cli & vue 3.x https://cli.vuejs.org/dev-guide/ui-api.html#ui-api https://cli.vuejs.org/zh/gu ...

  3. Vue脚手架搭建步骤

    Vue脚手架的搭建步骤 1.   去node.js官网下载node.js并安装,如下图: 2.   找到下载的文件并点击安装: 一直到finish完成.安装成功 3.   通过DOS密令打开: 输入: ...

  4. vue环境配置脚手架搭建,生命周期,钩子

    Vue项目环境搭建 """ node ~~ python:node是用c++编写用来运行js代码的 npm(cnpm) ~~ pip:npm是一个终端应用商城,可以换国内 ...

  5. 前端——Vue CLI 3.x搭建Vue项目

    一.Node安装 windows 1. Node.js (>=8.9, 推荐8.11.0+) Node官网下载 .msi 文件,按步骤下载安装即可. 安装完之后在cmd中输入 node -v,若 ...

  6. vue简单的脚手架搭建项目

    第一步 node环境安装 1.如果本机没有安装node运行环境,下载node安装包进行安装 下载地址:https://nodejs.org/en/或者http://nodejs.cn/ 第二步 nod ...

  7. vue cli创建脚手架

    1.用vscode打开一个文件夹.在菜单栏 点击 查看-集成终端.这里可以用其他的方法比如cmd命令符调开这个界面,但是要用cd 切到要放文件的文件夹下. 2.安装好node.js  和淘宝镜像 3. ...

  8. vue 脚手架搭建步骤!

    ========================================================== 说出来都是泪,最开始都不知道从哪里开始(回头一看还是很简单的,关键是要找到入口)  ...

  9. 让我们用Vue cli全家桶搭建项目

    一般项目都会用到这几个,这里不在详细介绍概念,只是简单的使用.一.搭建cli 1.事先安装好cnpm(淘宝镜像) npm install -g cnpm --registry=https://regi ...

随机推荐

  1. Flask框架之功能详解

    1|0浏览目录 配置文件 路由系统 视图 请求相关 响应 模板渲染 session 闪现 中间件 蓝图(blueprint) 特殊装饰器 1|1配置文件 知识点 给你一个路径 "settin ...

  2. HTML与CSS学习笔记(2)

    1.CSS背景样式? background-color 背景色 background-image 背景图 url(背景地址) 默认:会水平垂直铺满背景图 background-repeat 平铺方式 ...

  3. springboot+springcloud微服务项目全套资料(笔记+源码+代码)

    最近好几天没有写博客了,由于时间的太忙了,项目要做.各种资格证要考试,实在没有时间写了,今天正好赶上有闲暇的一刻,应许多的爱好者的要求发一份微服务项目的资料,此资料十分完整,且是最新的.希望各位读者能 ...

  4. 第四章、Go-面向“对象”

    4.1.结构体和方法 (1)go语言的面向对象 go仅支持封装,不支持继承和多态 go语言没有class,只有struct (2)struct的创建 package main import " ...

  5. vijos2051 SDOI2019 快速查询

    题目链接 吐槽 竟然让\(nlog\)的做法卡过去了.. 思路 因为\(1 \le q \le 10^5\),所以可以先对每个标准操作,所操作的位置进行重标号.这样所有的下标都是在\(10^5\)以内 ...

  6. 【2019.7.25 NOIP模拟赛 T1】变换(change)(思维+大分类讨论)

    几个性质 我们通过推式子可以发现: \[B⇒AC⇒AAB⇒AAAC⇒C\] \[C⇒AB⇒AAC⇒AAAB⇒B\] 也就是说: 性质一: \(B,C\)可以相互转换. 则我们再次推式子可以发现: \[ ...

  7. 【LG5330】[SNOI2019]数论

    [LG5330][SNOI2019]数论 题面 洛谷 题目大意: 给定集合\(\mathbb {A,B}\) 问有多少个小于\(T\)的非负整数\(x\)满足:\(x\)除以\(P\)的余数属于\(\ ...

  8. [LeetCode] 843. Guess the Word 猜单词

    This problem is an interactive problem new to the LeetCode platform. We are given a word list of uni ...

  9. SpringBoot-dubbo自定义负载均衡实现简单灰度

    本文介绍如何利用dubbo自定义负载实现简单灰度(用户纬度,部分用户访问一个服务,其余访问剩余服务). 其实在这之前,对dubbo了解的也不是很多,只是简单的使用过,跑了几个demo而已,但是得知接下 ...

  10. java通过maven打包解决xml读取格式失败问题

    <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compi ...