0

C:\WINDOWS\system32>npm i g expo-cli npm ERR! code FETCH_ERROR npm ERR! errno FETCH_ERROR npm ERR! invalid json response body at https://registry.npmjs.org/dateformat reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\moha\AppData\Local\npm-cache_logs\2022-10-30T07_31_55_053Z-debug-0.log

C:\WINDOWS\system32>npm install -g expo-cli npm ERR! code FETCH_ERROR npm ERR! errno FETCH_ERROR npm ERR! invalid json response body at https://registry.npmjs.org/dateformat reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\moha\AppData\Local\npm-cache_logs\2022-10-30T07_35_04_436Z-debug-0.log

C:\WINDOWS\system32>npm install expo-cli --global npm ERR! code FETCH_ERROR npm ERR! errno FETCH_ERROR npm ERR! invalid json response body at https://registry.npmjs.org/dateformat reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\moha\AppData\Local\npm-cache_logs\2022-10-30T07_36_00_036Z-debug-0.log

how to solve this one?

  • Does this answer your question? [npm ERR! invalid json response body at http://registry.npmjs.org/ansi-escapes reason: Unexpected end of JSON input](https://stackoverflow.com/questions/64625539/npm-err-invalid-json-response-body-at-http-registry-npmjs-org-ansi-escapes-re) – Nik Oct 30 '22 at 07:46
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Drashti Kheni Oct 31 '22 at 04:33

1 Answers1

0

You need to run this command.

npm cache clean --force

It will remove any incomplete cached installation. Then try running your command.

doc
  • 828
  • 2
  • 6
  • 18