#angular #npm
#угловой #нпм
Вопрос:
Я хотел запустить эту команду
npm i @angular/cdk
и я получаю эту ошибку :
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: angular-osm@0.0.0 npm ERR! Found: zone.js@0.11.4 npm ERR! node_modules/zone.js npm ERR! zone.js@"~0.11.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer zone.js@"~0.10.3" from @angular/core@10.1.6 npm ERR! node_modules/@angular/core npm ERR! @angular/core@"~10.1.2" from the root project npm ERR! peer @angular/core@"10.1.6" from @angular/common@10.1.6 npm ERR! node_modules/@angular/common npm ERR! @angular/common@"~10.1.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.
Я снял node_modules
, побежал npm install
npm audit
, npm audit fix
и npm i --legacy-peer-deps
без вуали. Я также обновил «ядро жасмина» до «~3.6.0». Угловая версия: ‘10.1.2’ Версия узла: ‘16.13.0’ Версия NPM : ‘8.1.4’
Вот мое package.json
досье :
{ "name": "angular-osm", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "~10.1.2", "@angular/common": "~10.1.2", "@angular/compiler": "~10.1.2", "@angular/core": "~10.1.2", "@angular/forms": "~10.1.2", "@angular/platform-browser": "~10.1.2", "@angular/platform-browser-dynamic": "~10.1.2", "@angular/router": "~10.1.2", "@asymmetrik/ngx-leaflet": "^8.1.0", "@types/leaflet": "^1.5.17", "angular-bootstrap-md": "^12.1.0", "jquery": "^3.6.0", "leaflet": "^1.7.1", "rxjs": "~6.6.3", "tslib": "^2.0.1", "zone.js": "~0.11.1" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1001.2", "@angular/cli": "~10.1.2", "@angular/compiler-cli": "~10.1.2", "@types/jasmine": "~3.5.14", "@types/jasminewd2": "~2.0.8", "@types/jquery": "^3.5.9", "@types/node": "^14.11.2", "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~6.0.0", "karma": "~5.2.2", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.3", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.5.4", "protractor": "~7.0.0", "ts-node": "~9.0.0", "tslint": "~6.1.0", "typescript": "~4.0.3"} }