1

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.

3
  • WHats the package.json file ? CAn you paste it here. Whats' there in `2020-05-24T09_59_48_560Z-debug.log`` ?? Commented May 24, 2020 at 10:33
  • It is impossible to paste the whole code in package.json file, here. Stackoverflow doesn't allow as it is that much long Commented May 24, 2020 at 11:17
  • Can u check the Error line on that log file. Without it , its impossible to tell what's wrong in the npm command Commented May 24, 2020 at 15:24

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.