Issue
npm resolution error report
While resolving: front-movit@0.0.0 Found: @angular/common@14.3.0 node_modules/@angular/common @angular/common@"^14.2.12" from the root project
Could not resolve dependency: peer @angular/common@">=13.0.0 <14.0.0" from @ng-select/ng-select@8.3.0 node_modules/@ng-select/ng-select @ng-select/ng-select@"^8.1.1" from the root project
Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
And here's our package.json:
{
"name": "front-movit",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.2.12",
"@angular/common": "^14.2.12",
"@angular/compiler": "^14.2.12",
"@angular/core": "^14.2.12",
"@angular/forms": "^14.2.12",
"@angular/platform-browser": "^14.2.12",
"@angular/platform-browser-dynamic": "^14.2.12",
"@angular/router": "^14.2.12",
"@ckeditor/ckeditor5-angular": "^2.0.2",
"@ckeditor/ckeditor5-build-classic": "^31.0.0",
"@ds/core": "^0.0.10",
"@ds/form": "^0.0.4",
"@ds/grid": "^0.0.6",
"@ds/plugins": "^0.0.2",
"@ds/utils": "^0.1.1",
"@microsoft/signalr": "^6.0.3",
"@mingleats/ng-extract-i18n-merge": "^1.0.2-SNAPSHOT",
"@ng-select/ng-select": "^8.1.1",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@swimlane/ngx-datatable": "^20.0.0",
"@types/jquery": "^3.5.16",
"@types/leaflet": "^1.9.4",
"axios": "^0.21.4",
"bootstrap": "^5.3.2",
"codelyzer": "^6.0.0",
"fast-json-patch": "^3.0.0-1",
"follow-redirects": "^1.15.2",
"glob-parent": "^5.1.2",
"jquery": "^3.7.1",
"leaflet": "^1.9.4",
"ngx-bootstrap": "^8.0.0",
"ngx-cookie-service": "^13.1.2",
"ngx-currency": "^2.5.1",
"ngx-file-drop": "^11.3.0",
"ngx-mask": "^11.1.4",
"ngx-spinner": "^14.0.0",
"ngx-stars": "^1.5.1",
"ngx-toastr": "^13.0.0",
"ngx-translate": "^0.0.1-security",
"rxjs": "^6.6.3",
"sweetalert2": "^11.6.8",
"trim": "^1.0.1",
"trim-newlines": "^3.0.1",
"webpack": "^5.75.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.10",
"@angular/cli": "^14.2.10",
"@angular/compiler-cli": "^14.2.12",
"@angular/language-service": "^14.2.12",
"@angular/localize": "^14.2.12",
"@babel/core": "^7.11.6",
"@compodoc/compodoc": "^1.1.11",
"@storybook/addon-actions": "^6.0.21",
"@storybook/addon-essentials": "^6.0.21",
"@storybook/addon-links": "^6.0.21",
"@storybook/angular": "^6.0.21",
"@types/node": "^12.11.1",
"atgcli": "^1.2.6",
"babel-loader": "^8.1.0",
"ng-extract-i18n-merge": "^2.4.0",
"react-is": "^16.13.1",
"sonar-scanner": "^3.1.0",
"ts-node": "~7.0.0",
"tslib": "^2.4.1",
"tslint": "~6.1.0",
"typescript": "~4.6.4"
}
}
tried with --legacy-pers-deps and it still doesn't work:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@ds%2fcore - Not found
'@ds/core@^0.0.10' is not in this registry.
Solution
Your two problems do not seem to be related.
On one end you are trying to install a package that is not available publicly (@ds/core
), and on the other end, you are trying to use a version of @ng-select/ng-select
which is not compatible with your Angular version.
For the first issue, you should make sure you are trying to install the right package, and if it is a package internal to your organization, see internally how you are supposed to install it.
For the second issue, you should upgrade to a new version of @ng-select/ng-select
.
From https://www.npmjs.com/package/@ng-select/ng-select you can see that for Angular 14, you should use the version 9.x.x
of @ng-select
.
Run npm i @ng-select/ng-select@9.1.0
(you should fix the first issue first, or remove your dependency on @ds/core
).
Answered By - AntoineB
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.