4๐
โ
You need to have the package.json
file in your directory to have this chart.js
module saved locally.
To create a package.json
file, use the below command,
npm init
(which will ask you few questions and will create the file at the end).
Once you create your package.json
try executing the npm install chart.js --save
command and see if it works.
Hope this helps!
0๐
I had the same issue while running webpack server in the backgorund
When I shut down the local server, package got installed no problem.
-1๐
I have faced the same issue while installing chart.js using npm.
it seems you have to stop ng serve and then try npm install chart.js โsave because I tried the same and it is working fine in the same folder.
Source:stackexchange.com