Search code examples
vue.jsvue-cli-3

creating vue-cli3 project on git-bash


I'm trying to follow https://alligator.io/vuejs/demistifying-vue-webpack/ . Based on this I tried:

$ vue init webpack-simple demistify-project

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

So I tried:

$ yarn global add @vue/cli-init
yarn global v1.12.3
[1/4] Resolving packages...
warning @vue/cli-init > vue-cli > coffee-script@1.12.7: CoffeeScript on NPM 
has moved to "coffeescript" (no hyphen)
warning @vue/cli-init > vue-cli > metalsmith > gray-matter > coffee- 
s cript@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

warning "@vue/cli-init@3.2.0" has no binaries
Done in 15.69s.

then:

$ vue init webpack-simple demistify-project

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

How do I get this working?


Solution

  • You're trying to use a vue-cli 2 command with a vue-cli 3 version.

    Since version 3, the command to initialize a new project has changed so to do what you want you're not going to write vue init webpack-simple project but instead vue create project