Trying to figure out why the project builds correctly locally but fails on the build server
On both machines I use the same package.json
"name": "UDP",
"version": "0.0.1",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"buildProd": "ng build --prod",
"lint": "tslint \"src/**/*.ts\""
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/cli": "^1.0.0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/platform-server": "^5.0.0",
"@angular/router": "^5.0.0",
"@types/lodash": "4.14.150",
"ag-grid": "7.1.0",
"ag-grid-ng2": "7.1.2",
"angular-2-local-storage": "^2.0.0",
"angular-stormpath": "^0.1.0",
"angular2-jwt": "^0.2.3",
"angular2-toaster": "^2.0.0",
"bootstrap": "^3.3.7",
"bootstrap-datepicker": "1.7.1",
"chart.js": "^2.3.0",
"core-js": "^2.4.1",
"cors": "^2.8.1",
"dragula": "^3.7.2",
"easy-pie-chart": "^2.1.7",
"express": "^4.14.0",
"flot": "^0.8.0-alpha",
"font-awesome": "^4.7.0",
"jquery": "^3.1.1",
"jquery-sparkline": "^2.3.2",
"jquery.browser": "^0.1.0",
"jquery.flot.tooltip": "github:krzysu/flot.tooltip",
"moment": "^2.18.1",
"ng2-charts": "^1.4.0",
"ng2-datepicker": "^1.4.10",
"ng2-dragula": "^1.3.0",
"ng2-select": "^1.2.0",
"ng2-table": "^1.3.2",
"ng2-validation": "^3.1.3",
"ngx-bootstrap": "^2.0.2",
"path": "^0.12.7",
"protractor": "^4.0.14",
"rxjs": "^5.5.2",
"screenfull": "^3.0.2",
"simple-line-icons": "^2.4.1",
"ts-helpers": "^1.1.1",
"tslint": "^4.0.0",
"webdriver-manager": "^12.0.6",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "^1.0.0",
"@angular/common": "^4.0.2",
"@angular/compiler-cli": "^4.0.3",
"@types/jasmine": "2.5.38",
"@types/lodash": "4.14.116",
"@types/node": "^6.0.42",
"codelyzer": "~2.0.0-beta.1",
"concurrently": "^3.1.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "^4.0.0",
"karma": "^0.13.20",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-coverage": "1.1.1",
"karma-jasmine": "^1.1.0",
"karma-remap-istanbul": "^0.6.0",
"karma-typescript": "^3.0.1",
"protractor": "~4.0.13",
"ts-node": "^3.0.2",
"typescript": "~2.8.2"
}
}
I clean up node_modules before build happens (using the following script - rm -r node_modules
).
Getting the following after ng build --prod
:
@types/lodash/common/array.d.ts(483,22): error TS1005: ';'
Angular5 + Windows Server 2012 R2
Update npm
version to the latest and generate package-lock.json
file with this command:
npm i --package-lock-only
to properly handle dependencies and their versions.