react npm ERR! Unexpected end of JSON input while parsing near '...","natural-compare":"' code example
Example 1: npm ERR! Unexpected end of JSON input while parsing near '...r\nComment: https://o'
npm cache clean --force
npm install -g @angular/cli
Example 2: Unexpected end of JSON input while parsing near
Open Windows Powershell as admin
npm cache clean --force
solved the problem for me
Alternative : You can use yarn instead
npm install -g yarn