2

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\_logs\2019-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 ?

Adhik Mulat
  • 538
  • 2
  • 10
  • 39

2 Answers2

1

I had a very similar problem and simple npm cache clean --force command did not help too. I solved the problem by deleting C:\Users\User\AppData\Roaming\npm and C:\Users\User\AppData\Roaming\npm-cache directories and running an npm cache clean --force command after this. Then, npm install worked properly. If the problem continues to appear, reinstall Node.js and NPM. Do not forget to check if all previous files connected with them are deleted before the installation!

coder-coder
  • 323
  • 4
  • 13
0

This process work for me

1 - Run your Command Invite/Terminal as Administrator

2 - Install the Vue CLI globally with the command :

npm install -g vue-cli
Zoul Barizi
  • 369
  • 3
  • 12