Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

adhik13th's avatar

How to fix "npm ERR! Unexpected end of JSON input while parsing" on Vue CLI installation

I want to install Vue CLI . and i run this on my Git Bash .

ECLIPSE@DESKTOP-AIUUOKR MINGW64 ~
$ npm install -g @vue/cli

but having error like this :

ECLIPSE@DESKTOP-AIUUOKR MINGW64 ~
$ npm install -g @vue/cli
npm ERR! Unexpected end of JSON input while parsing near '...ery":"latest","throug'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ECLIPSE\AppData\Roaming\npm-cache\_logs19-10-09T02_48_52_427Z-debug.log

i try with solution in stackoverflow in this thread here

. i try with

ECLIPSE@DESKTOP-AIUUOKR MINGW64 ~/Desktop
$ npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.

but i try to install again , its have same error . someone can help me about this ?

0 likes
2 replies
siangboon's avatar

the installation should be straight forward...

anyhow, may be try to remove the previous version if you have any and update the npm also...

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.

adhik13th's avatar
adhik13th
OP
Best Answer
Level 2

i Solved this with turn off Anti Virus , turn Off windows Security and its work

Please or to participate in this conversation.