Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular project creation failed because of deprecated circular-json

I used following command to create new angular project

ng new hello-world

It failed showing

npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Unexpected end of JSON input while parsing near '...rocess":"~0.7.0"},"_h'

Then I installed flatted using...

npm i flatted

But the error still occurs. How to use flatted instead of deprecated library circular-json?

like image 458
Nida Munir Avatar asked Nov 02 '18 08:11

Nida Munir


2 Answers

Run following commands that will clean NPM cache

npm cache clean --force

after this run following command

npm install -g @angular/cli@latest

then you can create angular project.

like image 200
Dinesh Ghule Avatar answered Nov 14 '22 09:11

Dinesh Ghule


If it doesn't work, even after clearing the cache, which happened in my case:

Make sure you try the ng new create-app command using Powershell in administrator mode.

This worked for me.

like image 31
Jatin Varlyani Avatar answered Nov 14 '22 10:11

Jatin Varlyani