Error while installing vue CLI: npm ERR! Unexpected end of JSON input while parsing near '...ulp-rename":"0.0.33",' - npm

I had an older version of vue CLI and i want to upgrade to CLI 3, so first what I did is unistall the previous version:
npm uninstall vue-cli -g
Then tried to install:
npm install -g #vue/cli
I got the following error:
npm ERR! Unexpected end of JSON input while parsing near '...ulp-rename":"0.0.33",'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\31089\AppData\Roaming\npm-cache\_logs\2020-02-02T11_48_31_187Z-debug.log
The complete log information can be found here
My node version: v12.14.0
My npm version: 6.13.4
And I tried
npm cache clean --force
but didn't work.

I figured out, if you run command prompt window as an administrator, then first do
npm cache clean --force
then can install successfully.

Related

Vue : Unexpected end of JSON input while parsing near '...version":"0.5.0","dev'

I am Learning Vue JS. Planning to develop application on it. Initially I installed Vue by
npm install vue-cli -g
But some of good Friend told me that this is Depreciated. Its there in the documentation also.
Vue Javascript with npm install command
https://cli.vuejs.org/guide/installation.html
But unable to install Vue by cmd:
npm install -g #vue/cli
this gives me Error as :
npm ERR! Unexpected end of JSON input while parsing near '...version":"0.5.0","dev'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Abhilash\AppData\Roaming\npm-cache\_logs\2020-05-13T12_14_23_300Z-debug.log
What may be the Error ? How overcome from this ?
Try cleaning npm cache and then install vue
npm cache clean --force
npm install -g #vue/cli

Installation of npm lite-server gives an error

While following the Petshop tutorial, the final step requires the installation of lite-server from npm for the project to run on my browser (Firefox).
I tried the following command for installation, with PowerShell in administrator mode:
npm i lite-server -g
This gave me the following error message:
npm ERR! Unexpected end of JSON input while parsing near '...61d4d38b3260af8ae4e7"'
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Ubaba\AppData\Roaming\npm-cache_logs\2020-04-09T10_10_51_353Z-debug.log
I tried all the solutions mentioned on this page, but none of them seem to be working.
It seems an issue with the NPM mirror
Try this : npm cache clean --force
and after retry install Lite-server.
regards

installing Vue-edit-json not working using npm

I am trying to get this https://github.com/dirkliu/vue-json-editor editor to my project and as its stated on the instructions i am running npm install Vue-edit-json --save but it gives me this error:
Timocins-MacBook-Pro:s360auth timocinzaynal$ npm install --save Vue-edit-json
npm ERR! code E404
npm ERR! 404 Not Found: Vue-edit-json#latest
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/timocinzaynal/.npm/_logs/2018-12-16T10_49_18_730Z-debug.log
Is anybody else having this problem? If not what is different with me?
The docs you linked indicate the installation command is:
npm install vue-json-editor --save
But you tried a different (and nonexistent) package name:
npm install Vue-edit-json --save
^^^^^^^^^^^^^

How can I install gulp-cli#4.0?

I have trouble with installing gulp-cli.
npm install -g "gulpjs/gulp-cli#4.0"
I am getting this error.
npm ERR! code 1
npm ERR! Command failed: C:\Program Files\Git\mingw64\bin\git.EXE checkout 4.0
npm ERR! error: pathspec '4.0' did not match any file(s) known to git.
npm ERR!
Sorry for this question but what I am doing wrong with this?
Guy the last version of gulp-cli is 2.0.1, to install a specific version just run npm i -g gulp-cli#VERION-THAT-YOU-NEED maybe you would like to install gulp that is on version 4.0.0-alpha.3 , for it just run: npm install gulpjs/gulp#v4.0.0-alpha.3

Can't install "react native cli" globally by using git bash

When I type in "npm install -g react-native-cli" at git bash I get following errors:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\TOSHIBA İ5\AppData\Roaming\npm-cache_logs\2017-10-19T04_04_05_774Z-debug.log
I have already installed npm and added it's directory to PATH variable and when i type "which npm" at git bash it shows the directory so there is no problem about the installation of npm. But it still gives these errors and I am stuck.
Note: I am following the instructions on https://shift.infinite.red/getting-started-with-react-native-development-on-windows-90d85a72ae65
This could happen in some npm old versions. Make sure you are using an updated one.
npm install -g npm
Some linux distros have old versions of npm and node on their packages and you need to install it manually.
Edit: I just saw you have windows. Nevermind, still the old version could be a problem.