Reputation: 55
I am facing an issue, when trying to make production build with ng build --prod
while ng build and ng serve
running fine...
ERROR in ./node_modules/ngx-datetime-picker/fesm5/ngx-datetime-picker.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined at isAngularDecoratorMetadataExpression
and here is package.json
{
"name": "ubold-angular-vertical",
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.7",
"@angular/animations": "~8.0.0",
"@angular/cdk": "8.2.3",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/material": "7.3.2",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"@fullcalendar/angular": "^4.2.1",
"@fullcalendar/bootstrap": "^4.2.0",
"@fullcalendar/core": "^4.2.0",
"@fullcalendar/daygrid": "^4.2.0",
"@fullcalendar/interaction": "^4.2.0",
"@fullcalendar/timegrid": "^4.2.0",
"@iplab/ngx-file-upload": "^1.4.0",
"@ng-bootstrap/ng-bootstrap": "^5.1.0",
"@ng-select/ng-select": "^3.0.3",
"@types/file-saver": "^2.0.1",
"angular-archwizard": "^4.0.0",
"angular2-query-builder": "0.5.1",
"angularx-social-login": "^2.2.1",
"animate.css": "^3.7.2",
"apexcharts": "^3.8.3",
"bootstrap": "^4.3.1",
"chart.js": "^2.8.0",
"chartist": "^0.11.3",
"core-js": "^2.5.4",
"file-saver": "^2.0.2",
"metismenujs": "^1.0.3",
"moment": "^2.24.0",
"ng-apexcharts": "^1.0.5",
"ng-click-outside": "^4.0.0",
"ng-drag-drop": "^5.0.0",
"ng-multiselect-dropdown": "^0.2.10",
"ng2-charts": "^2.3.0",
"ng2-search-filter": "^0.5.1",
"ng5-slider": "^1.2.4",
"ngx-avatar": "^3.7.0",
"ngx-bootstrap": "^5.1.0",
"ngx-chartist": "^1.0.3",
"ngx-chips": "^2.1.0",
"ngx-color-picker": "^8.1.0",
"ngx-datetime-picker": "3.0.0",
"ngx-drag-drop": "^2.0.0",
"ngx-editor": "^4.1.0",
"ngx-image-cropper": "^1.4.1",
"ngx-lightbox": "^2.0.1",
"ngx-mask": "^8.0.3",
"ngx-moment": "^3.5.0",
"ngx-timer": "^1.0.6",
"ngx-ui-switch": "^8.1.0",
"rxjs": "^6.5.2",
"smooth-scrollbar": "^8.3.1",
"socket.io-client": "^2.3.0",
"sweetalert2": "^8.16.3",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "~8.0.2",
"@angular/compiler-cli": "~8.0.0",
"@angular/language-service": "~8.0.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "^3.4.2"
}
}
and ng version
is
Angular CLI: 8.0.2
Node: 10.16.3
OS: win32 x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.2
@angular-devkit/build-angular 0.800.2
@angular-devkit/build-optimizer 0.800.2
@angular-devkit/build-webpack 0.800.2
@angular-devkit/core 8.0.2
@angular-devkit/schematics 8.0.2
@angular/cdk 8.2.3
@angular/cli 8.0.2
@angular/material 7.3.2
@ngtools/webpack 8.0.2
@schematics/angular 8.0.2
@schematics/update 0.800.2
rxjs 6.5.2
typescript 3.4.2
webpack 4.30.0
Tried this link Angular cli build prod: TypeError: Cannot read property 'kind' of undefined but no success.. I tried much but no luck... Please suggest....
Upvotes: 0
Views: 1840
Reputation: 146
This appears to be a known issue https://github.com/RenovoSolutions/ngx-datetimepicker/issues/88
For now downgrading npm install [email protected] --save
appears to be the best solution. Not much action on that repo lately.
Upvotes: 2