1
votes

npm ERR! Unexpected end of JSON input while parsing near '...@types/run-sequence":'

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Acer\AppData\Roaming\npm-cache_logs\2020-05-24T09_59_48_560Z-debug.log × Package install failed, see above. The Schematic workflow failed. See above.

When I create a new angular project using "ng new newApp", Above error occured. I tried so many solutions, but did not work.

1
WHats the package.json file ? CAn you paste it here. Whats' there in `2020-05-24T09_59_48_560Z-debug.log`` ??Shashank Vivek
It is impossible to paste the whole code in package.json file, here. Stackoverflow doesn't allow as it is that much longJithmi Sachinika
Can u check the Error line on that log file. Without it , its impossible to tell what's wrong in the npm commandShashank Vivek

1 Answers

2
votes

I just uninstalled angular using the command,

npm uninstall -g @angular/cli

Then I cleared the cache using the following command,

npm cache clean --force

Then I reinstalled angular,

npm install -g @angular/cli

Then it worked successfully.