Home > Software design >  Failed to run the npm install
Failed to run the npm install

Time:02-04

I am getting the following error when I try to run the npm install.

D:\Startup\AmBlock\AmBlockApp>npm i      
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @amcharts/[email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/core
npm ERR!   @angular/core@"~12.0.3" from the root project
npm ERR!   peer @angular/core@"12.0.3" from @angular/[email protected]
npm ERR!   node_modules/@angular/animations
npm ERR!     @angular/animations@"~12.0.3" from the root project
npm ERR!     peer @angular/animations@"^12.0.0 || ^13.0.0-0" from @angular/[email protected]
npm ERR!     node_modules/@angular/material
npm ERR!       @angular/material@"^12.0.3" from the root project
npm ERR!     2 more (@angular/platform-browser, @swimlane/ngx-charts)
npm ERR!   13 more (@angular/cdk, @angular/common, @angular/flex-layout, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"^12.2.0 || ^13.0.0 || ^14.0.0" from @amcharts/[email protected]
npm ERR! node_modules/@amcharts/amcharts3-angular
npm ERR!   @amcharts/amcharts3-angular@"^3.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/core
npm ERR!   peer @angular/core@"^12.2.0 || ^13.0.0 || ^14.0.0" from @amcharts/[email protected]
npm ERR!   node_modules/@amcharts/amcharts3-angular
npm ERR!     @amcharts/amcharts3-angular@"^3.0.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\hp\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hp\AppData\Local\npm-cache\_logs\2023-02-04T07_43_43_807Z-debug-0.log

I try to install node_module. I want the node_module folder in my angular project.

CodePudding user response:

Read the documentation or google bro.

npm i something

to install "something" package.

so you type npm i that is wrong syntax.

CodePudding user response:

To resolve the issue with the unsupported version of the package "@amcharts/[email protected]", you need to update it to the latest version. To do this, please run the following command in your terminal/command prompt:

npm install @amcharts/amcharts3-angular --save

This will install the latest version of the package, which should work with Angular 12.

  • Related