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

Viewed 21105

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 hoek@5.0.4: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cross-spawn-async@2.2.5: 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

> protobufjs@6.8.8 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: fsevents@1.2.4 (node_modules\@vue\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! protobufjs@6.8.8 postinstall: `node scripts/postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protobufjs@6.8.8 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/cli@6.2.8
+-- cordova@8.1.2
+-- gulp-cli@2.0.1
+-- ionic@4.5.0
+-- nodemon@1.18.9
+-- npm@6.5.0
+-- npm-check@5.9.0
+-- sass@1.15.2
`-- serve@10.1.1
5 Answers

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.

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.

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.

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).

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

Related