Error with production build
guxs1129 opened this issue · 1 comments
guxs1129 commented
Prerequisites
Please answer the following questions for yourself before submitting an issue.
- I am running the latest version
- I checked the documentation and found no answer
- I checked to make sure that this issue has not already been filed
- I'm reporting the issue to the correct repository
Current Behavior
Expected Behavior
Failure Information
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
ng build --prod --aot
(buildOptimizer:true in angular.json)
Reproduce code snippet
...
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
- Angular version:7.2.16
- NodeJS version:11.15.0
- Operating System:MacOS Catalina 10.15.3
Failure Logs
ERROR in ./node_modules/ngx-vis/fesm2015/ngxvis.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 (/Users/c5301805/Desktop/incoming/testAjax/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:265:35)
at checkNodeForDecorators (/Users/c5301805/Desktop/incoming/testAjax/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:77:21)
at visitNodes (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:16144:30)
at Object.forEachChild (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:16372:24)
at transformer (/Users/c5301805/Desktop/incoming/testAjax/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:63:16)
at /Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:1390:86
at reduceLeft (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:1102:30)
at /Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:1390:42
at transformRoot (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:81154:82)
at Object.map (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:429:29)
at Object.transformNodes (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:81141:30)
at emitJsFileOrBundle (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:81497:32)
at emitSourceFileOrBundle (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:81465:13)
at forEachEmittedFile (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:81373:30)
at Object.emitFiles (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:81454:9)
at emitWorker (/Users/c5301805/Desktop/incoming/testAjax/node_modules/typescript/lib/typescript.js:86927:33)
hypery2k commented
can you provide a sample project?