For the past two days, I've been attempting to set up apollo
on an Angular
application. Unfortunately, I keep encountering the following error:
The package <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ea8b9a85868685c78b848d9f868b98">[email protected]</a> will be installed and executed.
Would you like to proceed? Yes
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2e485c41405a4b404a6e1e001e001e">[email protected]</a>
npm ERR! Found: @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a9cac6dbcce9989d8799879f">[email protected]</a>
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@"^14.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"^12.0.0 || ^13.0.0" from <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5f3e2f30333330723e31382a333e2d1f6c716f716e">[email protected]</a>
npm ERR! node_modules/apollo-angular
npm ERR! apollo-angular@"3.0.1" 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\xxx\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\xxx\AppData\Local\npm-cache\_logs\2022-07-18T14_07_12_565Z-debug-0.log
× Packages installation failed, see above.
Even after adding --force
or --legacy-peer-deps
to the end of the installation command, the issue remains unresolved.
angular.json
:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"frontend": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
...
packages.json
:
{
"name": "frontend",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
...