尝试使用prod标记构建时,我遇到了角度cli错误。
之前我使用的是angular-cli 1.6.3 ,然后它完美运行,但现在我在不同的PC上新安装了angular-cli 1.7.0 ,并给出了以下错误在做ng build时--prod
in ./src/$$_gendir/node_modules/ngx-chips/ngx-chips.ngfactory.ts “找不到模块:错误:无法解析'ngx-chips / components / index' 在'D:\ Project \ angular-test \ src \ $$ _ gendir \ node_modules \ ngx-chips
我是否需要将angular-cli版本降级到1.6.3或将我的项目cli版本升级到1.7.0? 这是我的package.json文件
{
"name": "my-sample-project",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.1.3",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@types/underscore": "^1.8.3",
"angular2-jwt": "^0.2.3",
"async": "^2.4.1",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"jquery": "^3.2.1",
"ngx-chips": "^1.5.11",
"ngx-pagination": "^3.0.1",
"papaparse": "^4.3.2",
"rxjs": "^5.1.0",
"sweetalert2": "^6.10.1",
"underscore": "^1.8.3",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "^1.6.3",
"@angular/compiler-cli": "^4.0.0",
"@types/async": "^2.0.40",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"@types/papaparse": "^4.1.28",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}