npm ERR! Unexpected end of JSON input while parsing near '...","mocha":"^3.2.0"
I:\RN\rn>npm install --global expo-cli
npm ERR! Unexpected end of JSON input while parsing near '...","mocha":"^3.2.0","s'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\motamed\AppData\Roaming\npm-cache\_logs\2019-10-23T17_17_45_512Z-debu
g.log
node: 9.9.0
npm: 5.6.0
step 1)
$ npm cache clean --force or
$ npm cache verify step 2)
$ npm install -g @angular/cli@latest or
try uninstalling and installing angular/cli
step 3)
$ npm install --save-dev @angular/cli@latest step 4)
delete node_modules and run $ npm install
thanks @Celfin i used npm cache clean --force and it solved the problem.
Looks like it was some kind of transient network error / corrupted npm cache. Glad the problem is solved now!
thanks @Celfin I used this command $ npm cache clean --force and iit solved this issue.
E:\git-test>npm install lite-server --save-dev npm ERR! Unexpected end of JSON input while parsing near '...mocha":"^1.21.4","sin'
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Sasi\AppData\Roaming\npm-cache_logs\2020-03-25T14_45_43_024Z-debug.log
node v12.16.1 npm 6.13.4
I even getting this error after all ur previous steps is to be followed
Thanks Dear @Celfin i used this code npm cache clean --force and solved it in my cmd thanks....
Thanks
Thank you so much @Celfin npm cache clean --force worked for me
**Getting this issue while expo-init ** Choose a template: expo-template-blank
🧶 Using Yarn to install packages. You can pass --npm to use npm instead.
× Something went wrong in downloading and extracting the project files.
invalid json response body at https://registry.npmjs.org/expo-template-blank reason: Unexpected end of JSON input
FetchError: invalid json response body at https://registry.npmjs.org/expo-template-blank reason: Unexpected end of JSON input
at C:\Users\Anurag Gharat\AppData\Local\Yarn\Data\global\node_modules\minipass-fetch\lib\body.js:77:31
at extractTemplateAppAsync (C:@expo\[email protected]\src\Exp.ts:167:3)
at Object.extractAndPrepareTemplateAppAsync (C:@expo\[email protected]\src\Exp.ts:131:3)
at action (C:\Users\Anurag Gharat\AppData\Local\Yarn\Data\global\node_modules\expo-cli\src\commands\init.ts:181:19)
at Command.
**Getting this issue while expo-init ** Choose a template: expo-template-blank
🧶 Using Yarn to install packages. You can pass --npm to use npm instead.
× Something went wrong in downloading and extracting the project files. invalid json response body at https://registry.npmjs.org/expo-template-blank reason: Unexpected end of JSON input FetchError: invalid json response body at https://registry.npmjs.org/expo-template-blank reason: Unexpected end of JSON input at C:\Users\Anurag Gharat\AppData\Local\Yarn\Data\global\node_modules\minipass-fetch\lib\body.js:77:31 at extractTemplateAppAsync (C:@expo\[email protected]\src\Exp.ts:167:3) at Object.extractAndPrepareTemplateAppAsync (C:@expo\[email protected]\src\Exp.ts:131:3) at action (C:\Users\Anurag Gharat\AppData\Local\Yarn\Data\global\node_modules\expo-cli\src\commands\init.ts:181:19) at Command. (C:\Users\Anurag Gharat\AppData\Local\Yarn\Data\global\node_modules\expo-cli\src\exp.ts:80:7)
How did you fix this?