Can't install @vue/cli 3 on Windows 10
Asked Answered
P

5

9

I can't install the most recent version of Vue, either globally or locally.

I have this error, for both installations. I don't understand why Node is not recoginized as a command as it works well for other packages.

For example, installation of Vue 2 with vue-cli works perfectly. I have also checked the path in advanced systems, and added it to the installation folder D:\Nodejs, both system and user variables.

$ npm install -g @vue/cli
npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
C:\Users\huygh\AppData\Roaming\npm\vue -> C:\Users\huygh\AppData\Roaming\npm\node_modules\@vue\cli\bin\vue.js

> [email protected] postinstall C:\Users\huygh\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\protobufjs
> node scripts/postinstall

'node' n'est pas reconnu en tant que commande interne
ou externe, un programme ex▒cutable ou un fichier de commandes.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@vue\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\huygh\AppData\Roaming\npm-cache\_logs\2018-12-19T09_25_36_393Z-debug.log

Other packages like Angular work correctly. Here are the other global packages:

C:\Users\huygh\AppData\Roaming\npm
+-- @angular/[email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
Pindaric answered 19/12, 2018 at 9:35 Comment(0)
B
13

On Windows 10: Open start (Win Key) -> Type: cmd -> Right-Click: Command Prompt -> Select: Run as Administer -> Type: npm install -g @vue/cli.

NOTE: Make sure you are running Node.js version 8.9 or above (8.11.0+ recommended) before installing.

Bathelda answered 13/1, 2019 at 15:45 Comment(2)
Tried this and it ran for over half an hour and apparently got stuck.Posturize
did this exact thing and it didn't work for me :( and using node v8.11.3 getting "please use administrator" stillOralla
A
3

There seems to be an issue on vue cli 3. For the time being, it's best to stick to version 2. You can learn more about the issue here.

Adiaphorous answered 19/12, 2018 at 10:25 Comment(1)
I solved (for now) my problem by using Windows Command Prompt. It allowed me to installed it globally and to do npm run serve (also impossible from Git Bash).Incondensable
B
3

None of the above replies worked for me it was impossible to install vue via npm (I have windows 7). I just installed vue cli 3 via yarn and it worked perfeclty.

Breastfeed answered 20/9, 2019 at 18:16 Comment(0)
C
-1

I solved this one with Node.js command prompt. With simple cmd can't find vue, but with Node.js command prompt it's easy to install (npm install -g @vue/cli) and run it (vue create example-project).

Cantus answered 19/9, 2020 at 6:49 Comment(0)
K
-1

One way to resolve this is by uninstalling Node and reinstalling again. I mean, this method worked for me. Go to control panel -> Node -> Uninstall

And after installing the node - the first thing you need to do is install Vue CLI - npm install -g @vue/cli

Kassa answered 24/7, 2022 at 17:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.