A-A+

vue init命令执行不了怎么解决

2018年11月23日 VUE 暂无评论 阅读 10 views 次

如果初始化时无法执行。只需要运行一下

npm install -g vue

然后再运行

npm install -g @vue/cli-init

E:\vuestudy>vue init webpack vuewithelement

  Command vue init requires a global addon to be installed.
  Please run npm install -g @vue/cli-init and try again.


E:\vuestudy>cnpm install -g vue
Downloading vue to C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue_t
mp
Copying C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue_tmp\_vue@2.5
.17@vue to C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue
Installing vue's dependencies to C:\Users\Administrator\AppData\Roaming\npm\node
_modules\vue/node_modules
All packages installed (used 8ms(network 4ms), speed 0B/s, json 0(0B), tarball 0
B)

E:\vuestudy>vue init webpack vuewithelement

  Command vue init requires a global addon to be installed.
  Please run npm install -g @vue/cli-init and try again.


E:\vuestudy>npm install -g @vue/cli-init
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coff
eescript" (no hyphen)
终止批处理操作吗(Y/N)? y

E:\vuestudy>cnpm install -g @vue/cli-init
Downloading @vue/cli-init to C:\Users\Administrator\AppData\Roaming\npm\node_mod
ules\@vue\cli-init_tmp
Copying C:\Users\Administrator\AppData\Roaming\npm\node_modules\@vue\cli-init_tm
p\_@vue_cli-init@3.1.1@@vue\cli-init to C:\Users\Administrator\AppData\Roaming\n
pm\node_modules\@vue\cli-init
Installing @vue/cli-init's dependencies to C:\Users\Administrator\AppData\Roamin
g\npm\node_modules\@vue\cli-init/node_modules
[1/2] execa@^1.0.0 installed at node_modules\_execa@1.0.0@execa
[2/2] vue-cli@^2.9.2 installed at node_modules\_vue-cli@2.9.6@vue-cli
deprecate vue-cli@2.9.6 › metalsmith@2.3.0 › gray-matter@2.1.1 › coffee-script@^
1.12.4 CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
All packages installed (250 packages installed from npm registry, used 18s(netwo
rk 17s), speed 303.76kB/s, json 235(405.99kB), tarball 4.74MB)

E:\vuestudy>vue init webpack vuewithelement

\ downloading template  
打赏作者
如果文章对您有所帮助请打赏支持本站发展。

您的支持将鼓励我们继续创作!

[微信] 扫描二维码打赏

[支付宝] 扫描二维码打赏

标签:

给我留言

您必须 登录 才能发表留言!

Copyright © 前端技术分享休闲玩耍去处分享-大一网 保留所有权利.   Theme  Ality

用户登录 ⁄ 注册

分享到: