skndungu
skndungu

Reputation: 31

Problems installing Vue js

I am trying to install vue.js with no success, yet npm is up to date.
When I run vue init webpack vueapp I get this error:

No command 'vue' found, did you mean:Command 'vpe' from package 'texlive-latex-extra' (universe)
vue: command not found

I have already installed the cli using npm install vue-cli.

Thanks

Upvotes: 3

Views: 13878

Answers (8)

coskuncay
coskuncay

Reputation: 1

sudo npm install -g @aws-amplify/cli --unsafe-perm=true

It works for my situation.

Upvotes: 0

aacabey
aacabey

Reputation: 1

Just run npm install -g pnpm for the missing packages.

Then you can run npm install -g @vue/cli

Now you can ckeck the vue --version

Upvotes: 0

GrumpyCoder
GrumpyCoder

Reputation: 63

For me sudo helps to solve it. Try to use this command in terminal:

sudo yarn global add @vue/cli

Then you can check the version and all will work correctly.

vue --version

Upvotes: 1

Daniel F
Daniel F

Reputation: 14239

You need to use sudo.

The vue-cli documentation at https://cli.vuejs.org/guide/installation.html states that:

To install the new package, use one of the following commands. You need administrator privileges to execute these unless npm was installed on your system through a Node.js version manager (e.g. n or nvm).

npm install -g @vue/cli
# OR
yarn global add @vue/cli

Upvotes: 0

Try to use sudo npm install -g @vue/cli instead of npm install -g @vue/cli

Upvotes: 0

Eldin Z
Eldin Z

Reputation: 127

Try to use npm install -g @vue/cli and then vue ui to start client in your browser.

Upvotes: 4

Dan Oswalt
Dan Oswalt

Reputation: 2189

You'll want to use npm install -g @vue/cli. Restart your terminal to make sure it shows up.

Also, make sure you have node 8.9+

From the docs:

Warning regarding Previous Versions

The package name changed from vue-cli to @vue/cli. If you have the previous vue-cli (1.x or 2.x) package installed globally, you need to uninstall it first with npm uninstall vue-cli -g or yarn global remove vue-cli.

Node Version Requirement

Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended). You can manage multiple versions of Node on the same machine with nvm or nvm-windows.

Upvotes: 1

Stefdelec
Stefdelec

Reputation: 2811

Have you installed view? Can you check vue --version

https://cli.vuejs.org/guide/installation.html

Upvotes: 0

Related Questions