在我的AWS机器上,我有一个使用@angular/cli
创建的Angular 2 Web应用程序。我已尝试使用yarn
/ npm
安装所有软件包,但它似乎并未安装所有软件包,因为当我进入网站时,它不会注入任何提供程序而且它不会呈现正常。
我删除了node_modules/
.npm/cache
yarn/cache
的整个文件夹,重新安装了yarn
和npm
的所有内容,但它也无效。
我的package.json:
{
"name": "seon.site-builder.ui",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "^2.4.0",
"@angular/compiler": "^2.4.0",
"@angular/core": "^2.4.0",
"@angular/forms": "^2.4.0",
"@angular/http": "^2.4.0",
"@angular/platform-browser": "^2.4.0",
"@angular/platform-browser-dynamic": "^2.4.0",
"@angular/router": "^3.4.0",
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.24",
"@ngx-translate/core": "^6.0.0",
"@ngx-translate/http-loader": "^0.0.3",
"angular2-esri-loader": "^0.1.11",
"angular2-esri4-components": "^0.5.0",
"bootstrap": "4.0.0-alpha.6",
"core-js": "^2.4.1",
"esri-loader": "^0.1.3",
"font-awesome": "^4.7.0",
"intl": "^1.2.5",
"jquery": "^3.1.1",
"lodash": "^4.17.4",
"ng2-signalr": "1.0.8",
"ng2-table": "^1.3.2",
"ng2-validation": "^3.8.0",
"ngx-toastr": "^4.3.0",
"rxjs": "^5.1.0",
"settings-editor": "0.0.11",
"signalr": "^2.2.1",
"zone.js": "^0.7.6",
"moment": "^2.18.1",
"moment-timezone": "^0.5.11",
"@types/moment": "^2.13.0",
"@types/moment-timezone": "^0.2.34"
},
"devDependencies": {
"@angular/cli": "1.0.0-beta.32.3",
"@angular/compiler-cli": "^2.4.0",
"@types/arcgis-js-api": "^4.2.0",
"@types/jasmine": "^2.5.38",
"@types/lodash": "^4.14.58",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0-beta.4",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-phantomjs-launcher": "^1.0.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.4.2",
"typescript": "^2.2.1"
}
}
节点:6.10.2
Npm:3.10.10
纱线:0.22.0
跑完后:
npm cache clean
rm -rf node_modules/
npm install
我会在Angular中遇到UNMET PEER DEPENDENCY
错误:
├── UNMET PEER DEPENDENCY @angular/common@2.4.10
├── UNMET PEER DEPENDENCY @angular/compiler@2.4.10
├── UNMET PEER DEPENDENCY @angular/core@2.4.10
├── UNMET PEER DEPENDENCY @angular/forms@2.4.10
└── UNMET PEER DEPENDENCY tslint@5.1.0