I’m encountering a dependency resolution error in my Angular project when trying to install packages. The project uses Angular 17, but there seems to be a version conflict with @angular/cdk and @angular/material, which depend on an older version of Angular. The Angular Update Guide doesnt invlove any step of updating these two to verison 17. Here are the error details:
found 0 vulnerabilities
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '~12.16.2' },
npm WARN EBADENGINE current: { node: 'v20.12.1', npm: '10.5.0' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at <https://github.com/visionmedia/superagent/releases>.
npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3!
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! While resolving: @angular/[email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! @angular/common@"^17.3.6" from the root project
npm ERR! peer @angular/common@"17.3.6" from @angular/[email protected]
npm ERR! @angular/forms@"~17.3.6" from the root project
npm ERR! 4 more (@angular/platform-browser, ...)
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^15.0.0 || ^16.0.0" from @angular/[email protected]
npm ERR! @angular/cdk@"^15.2.9" from the root project
npm ERR! peer @angular/cdk@"15.2.9" from @angular/[email protected]
npm ERR! @angular/material@"^15.2.9" from the root project
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! peer @angular/common@"^15.0.0 || ^16.0.0" from @angular/[email protected]
npm ERR! @angular/cdk@"^15.2.9" from the root project
npm ERR! peer @angular/cdk@"15.2.9" from @angular/[email protected]
Attempts:
I’ve tried updating @angular/cdk and @angular/material to the latest versions, using .
Using –force, that works but I still dont want the erros since they might bring problems later. Also tried to upgrade to Angular Materials 17 with “ng update @angular/material” but that did not work.
How can I resolve these version conflicts effectively without risking instability in my Angular project? I would be gratefull for any help since I am very new to angular.
Nespull is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.