我要构建没有构建的角度应用程序。然后我尝试了 npm ls redux 我遇到了这个问题。
├── UNMET PEER DEPENDENCY @angular/common@7.2.15
├── UNMET PEER DEPENDENCY @angular/core@7.2.15
├── UNMET PEER DEPENDENCY jquery@1.9.1 - 3
├── UNMET PEER DEPENDENCY popper.js@^1.14.7
└── redux@4.0.4
npm ERR! peer dep missing: @angular/common@>=6.0.0-beta.0 <7.0.0, required by @angular/cdk@6.4.7
npm ERR! peer dep missing: @angular/common@>=6.0.0-beta.0 <7.0.0, required by @angular/material@6.4.7
npm ERR! peer dep missing: @angular/core@^6.0.1, required by @angular-redux/store@9.0.0
npm ERR! peer dep missing: @angular/core@>=6.0.0-beta.0 <7.0.0, required by @angular/cdk@6.4.7
npm ERR! peer dep missing: @angular/core@>=6.0.0-beta.0 <7.0.0, required by @angular/material@6.4.7
npm ERR! peer dep missing: @angular/core@^6.0.0, required by @ngrx/store@6.1.2
npm ERR! peer dep missing: jquery@1.9.1 - 3, required by bootstrap@4.3.1
npm ERR! peer dep missing: popper.js@^1.14.7, required by bootstrap@4.3.1
我知道这是依赖性问题,我尝试了很少的解决方案,但没有成功,我使用 npm install npm -g 更新了npm,但这对我不起作用,我还降低了redux的等级商店,但对我不起作用。
这是我的 package.json 文件:
{
"name": "MyApp",
"version": "0.0.1",
"license": "",
"author": "Team",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"compodoc": "npx compodoc -p src/tsconfig.app.json"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"linters": {
"*.{ts,scss}": [
"prettier --write",
"git add"
]
},
"ignore": [
"**/dist/*.min.js"
]
},
"private": true,
"dependencies": {
"@angular-redux/store": "^9.0.0",
"@angular/animations": "^7.2.13",
"@angular/cdk": "^6.4.7",
"@angular/common": "^7.2.13",
"@angular/compiler": "^7.2.13",
"@angular/core": "^7.2.13",
"@angular/forms": "^7.2.13",
"@angular/http": "^7.2.13",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "^7.2.13",
"@angular/platform-browser-dynamic": "^7.2.13",
"@angular/router": "^7.2.13",
"@angular/upgrade": "^7.2.13",
"@ngrx/store": "^6.0.1",
"babel-polyfill": "^6.26.0",
"bootstrap": "^4.1.3",
"core-js": "^2.5.4",
"devextreme": "^18.2.7",
"devextreme-angular": "^18.2.7",
"devextreme-intl": "^18.2.3",
"hammerjs": "^2.0.8",
"immutable": "^3.8.2",
"jszip": "^3.1.5",
"lodash": "^4.17.11",
"ng2-currency-mask": "^5.3.1",
"ng6-breadcrumbs": "^1.0.7",
"readable-stream": "^2.3.6",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0",
"reflect-js": "^1.0.1",
"reselect": "^3.0.1",
"rxjs": "^6.4.0",
"systemjs": "^0.21.4",
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.12.3",
"@angular/cli": "^7.0.3",
"@angular/compiler-cli": "^7.2.13",
"@angular/language-service": "^7.2.13",
"@angular/platform-server": "^7.2.13",
"@types/jasmine": "~2.8.0",
"@types/jasminewd2": "^2.0.3",
"@types/lodash": "^4.14.123",
"@types/node": "^6.0.45",
"codelyzer": "^4.4.2",
"grunt": "^1.0.3",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-qunit": "^3.0.1",
"grunt-contrib-uglify": "^4.0.0",
"husky": "^2.2.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-phantomjs-launcher": "^1.0.2",
"lint-staged": "^8.1.6",
"phantomjs-prebuilt": "^2.1.7",
"prettier": "^1.17.0",
"protractor": "^5.4.2",
"ts-node": "^5.0.1",
"tslint": "^5.9.1",
"typescript": "3.2.4"
}
}