Skip to content

npm ERR! invalid json response body at https://registry.npmjs.org/case-sensitive-paths-webpack-plugin reason: Unexpected end of JSON input #11445

Closed
@sajjademad

Description

@sajjademad

Describe the bug

I get the error message (
npm ERR! errno FETCH_ERROR npm ERR! invalid json response body at https://registry.npmjs.org/case-sensitive-paths-webpack-plugin reason: Unexpected end of JSON input
)
when I try to run npx create-react-app my-app
this is my first time trying to install react.
I tried running :
npm cache clean --force
and npm cache verify
and npm init react-app my-app
and I still get the same error message
I'm running :
node v12.17.0
npm v7.23.0

and I'm using VS code as an editor.
vs code terminal shows:

Creating a new React app in C:\Users\GLOBAL_PC\Desktop\React\test\my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/case-sensitive-paths-webpack-plugin reason: Unexpected end of JSON input

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\GLOBAL_PC\AppData\Local\npm-cache\_logs\2021-09-15T13_36_05_594Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting my-app/ from C:\Users\GLOBAL_PC\Desktop\React\test
Done.

the log file contains 5k lines I'm not sure If I should copy paste it all but here's the last lines of the file :

5661 timing idealTree:node_modules/watchpack-chokidar2/node_modules/braces/node_modules/extend-shallow Completed in 2ms
5662 timing idealTree:node_modules/watchpack-chokidar2/node_modules/is-extendable Completed in 0ms
5663 timing idealTree:node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/upath Completed in 0ms
5664 timing idealTree:node_modules/watchpack-chokidar2/node_modules/fill-range/node_modules/extend-shallow Completed in 0ms
5665 timing idealTree:node_modules/watchpack-chokidar2/node_modules/glob-parent/node_modules/is-glob Completed in 0ms
5666 timing idealTree:node_modules/watchpack-chokidar2/node_modules/is-number/node_modules/kind-of Completed in 0ms
5667 silly placeDep node_modules/webpack is-extendable@0.1.1 OK for: extend-shallow@2.0.1 want: ^0.1.0
5668 timing idealTree:node_modules/webpack/node_modules/braces/node_modules/extend-shallow Completed in 2ms
5669 timing idealTree:node_modules/webpack/node_modules/is-extendable Completed in 0ms
5670 timing idealTree:node_modules/webpack/node_modules/fill-range/node_modules/extend-shallow Completed in 0ms
5671 timing idealTree:node_modules/webpack/node_modules/is-number/node_modules/kind-of Completed in 0ms
5672 timing idealTree:node_modules/webpack/node_modules/terser-webpack-plugin/node_modules/terser Completed in 0ms
5673 timing idealTree:buildDeps Completed in 18718ms
5674 timing idealTree:fixDepFlags Completed in 43ms
5675 timing idealTree Completed in 18792ms
5676 timing command:install Completed in 18811ms
5677 verbose type invalid-json
5678 verbose stack FetchError: invalid json response body at https://registry.npmjs.org/case-sensitive-paths-webpack-plugin reason: Unexpected end of JSON input
5678 verbose stack     at C:\Users\GLOBAL_PC\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\body.js:77:31
5678 verbose stack     at async Promise.all (index 17)
5678 verbose stack     at async Arborist.[buildDepStep] (C:\Users\GLOBAL_PC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1017:5)
5678 verbose stack     at async Arborist.buildIdealTree (C:\Users\GLOBAL_PC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:210:7)
5678 verbose stack     at async Promise.all (index 1)
5678 verbose stack     at async Arborist.reify (C:\Users\GLOBAL_PC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:147:5)
5678 verbose stack     at async Install.install (C:\Users\GLOBAL_PC\AppData\Roaming\npm\node_modules\npm\lib\install.js:169:5)
5679 verbose cwd C:\Users\GLOBAL_PC\Desktop\React\test\my-app
5680 verbose Windows_NT 10.0.19042
5681 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\GLOBAL_PC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts" "cra-template"
5682 verbose node v12.17.0
5683 verbose npm  v7.23.0
5684 error code FETCH_ERROR
5685 error errno FETCH_ERROR
5686 error invalid json response body at https://registry.npmjs.org/case-sensitive-paths-webpack-plugin reason: Unexpected end of JSON input
5687 verbose exit 1```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions