@vue/cli安装

vue

Vue.js作为当前最热门的前端开发框架,已成为了前端开发者必学的内容之一。但是Vue环境的搭建稍显复杂和繁琐,项目的构建也没那么方便。

为了解决这个问题,Vue官方提供了Vue CLI。

Vue CLI是一个全局安装的 npm 包,提供了终端里的 vue 命令。

它可以通过 vue create 快速创建一个新项目的脚手架,或者直接通过 vue serve 构建新想法的原型。

你也可以通过 vue ui 通过一套图形化界面管理你的所有项目。

@vue/cli安装

cnpm install -g @vue/cli

或者yarn global add @vue/cli

MacBookPro:node_modules zhangxm$ sudo cnpm install -g @vue/cli

Downloading @vue/cli to /usr/local/lib/node_modules/@vue/cli_tmp

Copying /usr/local/lib/node_modules/@vue/cli_tmp/_@vue_cli@4.1.1@@vue/cli to /usr/local/lib/node_modules/@vue/cli

Installing @vue/cli's dependencies to /usr/local/lib/node_modules/@vue/cli/node_modules

[1/36] deepmerge@^3.2.0 installed at node_modules/_deepmerge@3.3.0@deepmerge

[2/36] commander@^2.20.0 installed at node_modules/_commander@2.20.3@commander

[3/36] @vue/cli-ui-addon-webpack@^4.1.1 installed at node_modules/_@vue_cli-ui-addon-webpack@4.1.1@@vue/cli-ui-addon-webpack

[4/36] didyoumean@^1.2.1 installed at node_modules/_didyoumean@1.2.1@didyoumean

[5/36] @vue/cli-ui-addon-widgets@^4.1.1 installed at node_modules/_@vue_cli-ui-addon-widgets@4.1.1@@vue/cli-ui-addon-widgets

[6/36] execa@^1.0.0 existed at node_modules/_execa@1.0.0@execa

[7/36] debug@^4.1.0 installed at node_modules/_debug@4.1.1@debug

[8/36] cmd-shim@^2.0.2 installed at node_modules/_cmd-shim@2.1.0@cmd-shim

[9/36] ejs@^2.7.1 installed at node_modules/_ejs@2.7.4@ejs

[10/36] chalk@^2.4.1 installed at node_modules/_chalk@2.4.2@chalk

[11/36] envinfo@^7.5.0 installed at node_modules/_envinfo@7.5.0@envinfo

[12/36] fs-extra@^7.0.1 installed at node_modules/_fs-extra@7.0.1@fs-extra

[13/36] boxen@^4.1.0 installed at node_modules/_boxen@4.2.0@boxen

[14/36] isbinaryfile@^4.0.0 installed at node_modules/_isbinaryfile@4.0.2@isbinaryfile

[15/36] javascript-stringify@^1.6.0 installed at node_modules/_javascript-stringify@1.6.0@javascript-stringify

[16/36] lru-cache@^5.1.1 existed at node_modules/_lru-cache@5.1.1@lru-cache

[17/36] import-global@^0.1.0 installed at node_modules/_import-global@0.1.0@import-global

[18/36] lodash.clonedeep@^4.5.0 installed at node_modules/_lodash.clonedeep@4.5.0@lodash.clonedeep

[19/36] request@^2.87.0 existed at node_modules/_request@2.88.0@request

[20/36] request-promise-native@^1.0.8 existed at node_modules/_request-promise-native@1.0.8@request-promise-native

[21/36] minimist@^1.2.0 installed at node_modules/_minimist@1.2.0@minimist

[22/36] semver@^6.1.0 existed at node_modules/_semver@6.3.0@semver

[23/36] @vue/cli-shared-utils@^4.1.1 installed at node_modules/_@vue_cli-shared-utils@4.1.1@@vue/cli-shared-utils

[24/36] js-yaml@^3.13.1 installed at node_modules/_js-yaml@3.13.1@js-yaml

[25/36] resolve@^1.13.0 installed at node_modules/_resolve@1.14.0@resolve

[26/36] inquirer@^6.3.1 installed at node_modules/_inquirer@6.5.2@inquirer

[27/36] slash@^3.0.0 installed at node_modules/_slash@3.0.0@slash

[28/36] shortid@^2.2.15 installed at node_modules/_shortid@2.2.15@shortid

[29/36] recast@^0.18.1 installed at node_modules/_recast@0.18.5@recast

[30/36] validate-npm-package-name@^3.0.0 installed at node_modules/_validate-npm-package-name@3.0.0@validate-npm-package-name

[31/36] download-git-repo@^1.0.2 installed at node_modules/_download-git-repo@1.1.0@download-git-repo

[32/36] yaml-front-matter@^3.4.1 installed at node_modules/_yaml-front-matter@3.4.1@yaml-front-matter

[33/36] globby@^9.2.0 installed at node_modules/_globby@9.2.0@globby

[34/36] vue-jscodeshift-adapter@^2.0.2 installed at node_modules/_vue-jscodeshift-adapter@2.0.3@vue-jscodeshift-adapter

[35/36] jscodeshift@^0.6.4 installed at node_modules/_jscodeshift@0.6.4@jscodeshift

[npminstall:runscript] @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › nodemon@1.19.4 › chokidar@2.1.8 › fsevents@^1.2.7 found binding.gyp file, auto run "node-gyp rebuild", root: "/usr/local/lib/node_modules/@vue/cli/node_modules/_fsevents@1.2.11@fsevents"

gyp http GET https://npm.taobao.org/mirrors/node/v12.13.1/node-v12.13.1-headers.tar.gz

gyp http 200 https://npm.taobao.org/mirrors/node/v12.13.1/node-v12.13.1-headers.tar.gz

gyp http GET https://npm.taobao.org/mirrors/node/v12.13.1/SHASUMS256.txt

gyp http 200 https://npm.taobao.org/mirrors/node/v12.13.1/SHASUMS256.txt

SOLINK_MODULE(target) Release/.node

CXX(target) Release/obj.target/fse/fsevents.o

SOLINK_MODULE(target) Release/fse.node

[36/36] @vue/cli-ui@^4.1.1 installed at node_modules/_@vue_cli-ui@4.1.1@@vue/cli-ui

execute post install 5 scripts...

[1/5] scripts.postinstall ejs@^2.7.1 run "node ./postinstall.js", root: "/usr/local/lib/node_modules/@vue/cli/node_modules/_ejs@2.7.4@ejs"

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

[1/5] scripts.postinstall ejs@^2.7.1 finished in 82ms

[2/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › @apollographql/apollo-tools@0.4.2 › apollo-env@0.6.0 › core-js@^3.0.1 run "node -e \"try{require('./postinstall')}catch(e){}\"", root: "/usr/local/lib/node_modules/@vue/cli/node_modules/_core-js@3.5.0@core-js"

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 -)

[2/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › @apollographql/apollo-tools@0.4.2 › apollo-env@0.6.0 › core-js@^3.0.1 finished in 81ms

[3/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-types@0.2.9 › apollo-engine-reporting-protobuf@0.4.4 › @apollo/protobufjs@^1.0.3 run "node scripts/postinstall", root: "/usr/local/lib/node_modules/@vue/cli/node_modules/_@apollo_protobufjs@1.0.3@@apollo/protobufjs"

[3/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-types@0.2.9 › apollo-engine-reporting-protobuf@0.4.4 › @apollo/protobufjs@^1.0.3 finished in 82ms

[4/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › git-parse@1.0.3 › babel-polyfill@6.26.0 › core-js@^2.5.0 run "node -e \"try{require('./postinstall')}catch(e){}\"", root: "/usr/local/lib/node_modules/@vue/cli/node_modules/_core-js@2.6.11@core-js"

[4/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › git-parse@1.0.3 › babel-polyfill@6.26.0 › core-js@^2.5.0 finished in 73ms

[5/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › nodemon@^1.19.4 run "node bin/postinstall || exit 0", root: "/usr/local/lib/node_modules/@vue/cli/node_modules/_nodemon@1.19.4@nodemon"

Love nodemon? You can now support the project via the open collective:

> https://opencollective.com/nodemon/donate

[5/5] scripts.postinstall @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › nodemon@^1.19.4 finished in 184ms

anti semver @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › @types/cors@2.8.6 › @types/express@* delcares @types/express@*(resolved as 4.17.2) but using ancestor(apollo-server-express)'s dependency @types/express@4.17.1(resolved as 4.17.1)

anti semver @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › @types/graphql-upload@8.0.3 › @types/express@* delcares @types/express@*(resolved as 4.17.2) but using ancestor(apollo-server-express)'s dependency @types/express@4.17.1(resolved as 4.17.1)

anti semver @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › @types/graphql-upload@8.0.3 › @types/koa@2.11.0 › @types/cookies@0.7.4 › @types/express@* delcares @types/express@*(resolved as 4.17.2) but using ancestor(apollo-server-express)'s dependency @types/express@4.17.1(resolved as 4.17.1)

deprecate @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › git-parse@1.0.3 › babel-polyfill@6.26.0 › core-js@^2.5.0 core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

Recently updated (since 2019-12-11): 44 packages (detail see file /usr/local/lib/node_modules/@vue/cli/node_modules/.recently_updates.txt)

Today:

→ globby@9.2.0 › @types/glob@7.1.1 › @types/node@*(12.12.20) (02:09:41)

→ resolve@^1.13.0(1.14.0) (08:27:21)

→ jscodeshift@0.6.4 › @babel/preset-env@7.7.6 › browserslist@4.8.2 › node-releases@^1.1.42(1.1.43) (06:41:59)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-types@0.2.9 › apollo-engine-reporting-protobuf@0.4.4 › @apollo/protobufjs@1.0.3 › @types/node@^10.1.0(10.17.11) (02:10:44)

2019-12-17

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@^2.9.6(2.9.14) (20:24:09)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-types@^0.2.9(0.2.9) (20:23:51)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@^2.9.14(2.9.14) (20:24:06)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › @types/body-parser@1.17.1 › @types/connect@*(3.4.33) (21:28:08)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › apollo-cache-control@^0.8.9(0.8.9) (20:24:01)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › apollo-server-plugin-base@^0.6.9(0.6.9) (20:23:56)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › graphql-extensions@^0.10.8(0.10.8) (20:23:56)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › apollo-tracing@^0.8.9(0.8.9) (20:24:01)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › apollo-engine-reporting@^1.4.12(1.4.12) (20:24:01)

2019-12-16

→ @vue/cli-shared-utils@4.1.1 › string.prototype.padstart@3.1.0 › es-abstract@1.17.0-next.1 › is-regex@^1.0.4(1.0.5) (07:58:16)

→ jscodeshift@0.6.4 › @babel/preset-env@7.7.6 › browserslist@4.8.2 › caniuse-lite@^1.0.30001015(1.0.30001016) (14:32:37)

2019-12-15

→ @vue/cli-shared-utils@4.1.1 › request@2.88.0 › har-validator@5.1.3 › ajv@6.10.2 › fast-json-stable-stringify@^2.0.0(2.1.0) (00:17:57)

→ shortid@2.2.15 › nanoid@^2.1.0(2.1.8) (02:53:21)

2019-12-14

→ @vue/cli-shared-utils@4.1.1 › string.prototype.padstart@^3.0.0(3.1.0) (16:31:46)

→ jscodeshift@0.6.4 › flow-parser@0.*(0.114.0) (00:41:31)

→ vue-jscodeshift-adapter@2.0.3 › vue-template-compiler@^2.5.13(2.6.11) (03:58:29)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-link-state@0.4.2 › apollo-utilities@^1.0.8(1.3.3) (19:44:20)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-cache-inmemory@^1.6.3(1.6.5) (19:44:28)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-link-state@0.4.2 › graphql-anywhere@^4.1.0-alpha.0(4.2.6) (19:44:24)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-client@^2.6.4(2.6.8) (19:55:32)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › @oclif/command@1.5.19 › @oclif/plugin-help@^2(2.2.3) (02:22:14)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-cache-inmemory@1.6.5 › apollo-cache@^1.3.4(1.3.4) (19:44:23)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › @oclif/plugin-plugins@1.7.8 › cli-ux@^5.2.1(5.4.1) (02:22:59)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › nodemon@1.19.4 › chokidar@2.1.8 › fsevents@^1.2.7(1.2.11) (19:28:18)

2019-12-13

→ jscodeshift@0.6.4 › @babel/preset-env@7.7.6 › @babel/plugin-proposal-unicode-property-regex@7.7.4 › @babel/helper-create-regexp-features-plugin@7.7.4 › regexpu-core@4.6.0 › regjsparser@^0.6.0(0.6.1) (13:55:05)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-types@0.2.9 › apollo-server-env@2.4.3 › util.promisify@1.0.0 › object.getownpropertydescriptors@^2.0.3(2.1.0) (15:26:38)

2019-12-12

→ @vue/cli-shared-utils@4.1.1 › string.prototype.padstart@3.1.0 › es-abstract@^1.17.0-next.1(1.17.0-next.1) (13:57:53)

→ vue-jscodeshift-adapter@^2.0.2(2.0.3) (05:26:04)

→ jscodeshift@0.6.4 › @babel/preset-env@7.7.6 › core-js-compat@^3.4.7(3.5.0) (08:59:54)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@^2.20.0(2.21.2) (06:17:26)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › @apollographql/apollo-tools@^0.4.2(0.4.2) (06:17:09)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › apollo-codegen-core@^0.35.9(0.35.9) (06:17:16)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › apollo-codegen-core@0.35.9 › apollo-language-server@^1.17.2(1.17.2) (06:17:12)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › apollo-codegen-flow@^0.33.34(0.33.34) (06:17:20)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › apollo-codegen-swift@^0.35.14(0.35.14) (06:17:20)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › apollo-codegen-scala@^0.34.34(0.34.34) (06:17:20)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo-server-express@2.9.14 › apollo-server-core@2.9.14 › apollo-engine-reporting@1.4.12 › apollo-graphql@^0.3.4(0.3.6) (06:17:09)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › @apollographql/apollo-tools@0.4.2 › apollo-env@0.6.0 › core-js@^3.0.1(3.5.0) (08:58:51)

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › apollo-codegen-typescript@^0.35.9(0.35.9) (06:17:20)

2019-12-11

→ @vue/cli-ui@4.1.1 › vue-cli-plugin-apollo@0.21.3 › apollo@2.21.2 › @oclif/plugin-plugins@1.7.8 › yarn@^1.15.0(1.21.1) (17:40:56)

All packages installed (978 packages installed from npm registry, used 2m(network 2m), speed 374.01kB/s, json 861(2.12MB), tarball 33.45MB)

[@vue/cli@4.1.1] link /usr/local/bin/vue@ -> /usr/local/lib/node_modules/@vue/cli/bin/vue.js

sudo npm install -g @vue/cli --unsafe-perm(最好使用npm)

MacBookPro:~ zhangxm$ sudo npm install -g @vue/cli --unsafe-perm

npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

/usr/local/bin/vue -> /usr/local/lib/node_modules/@vue/cli/bin/vue.js

> fsevents@1.2.11 install /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents

> node-gyp rebuild

SOLINK_MODULE(target) Release/.node

CXX(target) Release/obj.target/fse/fsevents.o

SOLINK_MODULE(target) Release/fse.node

> core-js@2.6.11 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/babel-polyfill/node_modules/core-js

> node -e "try{require('./postinstall')}catch(e){}"

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 -)

> core-js@2.6.11 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/babel-runtime/node_modules/core-js

> node -e "try{require('./postinstall')}catch(e){}"

> core-js@3.5.0 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/core-js

> node -e "try{require('./postinstall')}catch(e){}"

> @apollo/protobufjs@1.0.3 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/@apollo/protobufjs

> node scripts/postinstall

> nodemon@1.19.4 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/nodemon

> node bin/postinstall || exit 0

> ejs@2.7.4 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/ejs

> node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

+ @vue/cli@4.1.1

added 1150 packages from 636 contributors, removed 21 packages and updated 1 package in 74.818s

vue ui

MacBookPro:node_modules zhangxm$ vue --version

@vue/cli 4.1.1

MacBookPro:node_modules zhangxm$ vue ui

???? Starting GUI...

???? Ready on http://localhost:8000

配置淘宝node-sass

npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/

以上是 @vue/cli安装 的全部内容, 来源链接: utcz.com/z/380695.html

回到顶部