Compustretch
Compustretch

Reputation: 127

All Vue commands return "Unknown command"

Using Vue 2.9.4 on Ubuntu 18.04, all commands return the error "Unknown command"

compustretch@instance-1:~/vuetest$ vue init webpack testapp

  Unknown command init.

  vue-cli · Failed to download repo vuejs-templates/[object Object]: Response code 404 (Not Found)

compustretch@instance-1:~/vuetest$ vue list

  Unknown command list.

  Available official templates:

  ★  browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.
  ★  browserify-simple - A simple Browserify + vueify setup for quick prototyping.
  ★  pwa - PWA template for vue-cli based on the webpack template
  ★  simple - The simplest possible Vue setup in a single HTML file
  ★  webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
  ★  webpack-simple - A simple Webpack + vue-loader setup for quick prototyping.

compustretch@instance-1:~/vuetest$ vue help init

  Unknown command help.

  vue-[object Object](1) does not exist, try --help

compustretch@instance-1:~/vuetest$ vue --version
2.9.4
compustretch@instance-1:~/vuetest$

Hoping someone has an inkling why this is happening, as I've been banging my head on this and there's nothing in search results at all.

Upvotes: 1

Views: 3313

Answers (2)

Ivan
Ivan

Reputation: 1241

You need to uninstall with this command npm uninstall -g vue-cli

Then install with v3 with following command npm install -g @vue/cli (not sure why they f****d up with current 2.9.4 version)

Also they will require you to install extra stuffs like init, list, etc. after

UPDATE:

Forget about npm install -g @vue/cli because it's still beta and it gives you a lot of problems when you work with other libraries like nuxt.

I recommend you to try this command npm install -g [email protected] it will save you a lot of headcaches.

Upvotes: 9

vishwaraj
vishwaraj

Reputation: 487

I solved mine with this solution:

  1. Uninstall previous version npm uninstall -g vue-cli
  2. Install vue globally npm install -g @vue/cli-init

Upvotes: 0

Related Questions