harshit dubey
harshit dubey

Reputation: 11

Facing "Unexpected end of JSON input" problem in npm install command

1555 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...pes/node":"^12.6.9","'

1555 verbose stack     at JSON.parse (<anonymous>)

1555 verbose stack     at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)

1555 verbose stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50

1555 verbose stack     at runMicrotasks (<anonymous>)

1555 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)

1556 verbose cwd E:\Dubey\Projects\simplefolio

1557 verbose Windows_NT 10.0.18363

1558 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"

1559 verbose node v12.16.3

1560 verbose npm  v6.14.4

1561 error Unexpected end of JSON input while parsing near '...pes/node":"^12.6.9","'

1562 verbose exit [ 1, true ]

This error log I am getting every time I run npm install

Upvotes: 1

Views: 1616

Answers (1)

Muhammad Fazeel
Muhammad Fazeel

Reputation: 578

try this

npm cache clean --force

and then run your command

Upvotes: 1

Related Questions