ERROR in C:/Dev/project-ui/node_modules/@angular-material-extensions/google-maps-autocomplete/fesm5/angular-material-extensions-google-maps-autocomplete.js
Module build failed (from C:/Dev/project-ui/node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
TypeError: Cannot read property 'kind' of undefined
at isAngularDecoratorMetadataExpression (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:265:35)
at checkNodeForDecorators (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:77:21)
at visitNodes (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16514:30)
at Object.forEachChild (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16740:24)
at checkNodeForDecorators (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16505:24)
at Object.forEachChild (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16635:21)
at checkNodeForDecorators (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16505:24)
at Object.forEachChild (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16692:24)
at checkNodeForDecorators (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16505:24)
at Object.forEachChild (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16703:24)
at checkNodeForDecorators (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\src\transforms\scrub-file.js:68:31)
at visitNode (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16505:24)
at Object.forEachChild (C:\Dev\project-ui\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:16599:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project-web@0.0.0 build:customer:prod: `ng build customer-app --prod --aot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project-web@0.0.0 build:customer:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Bug Report or Feature Request (mark with an
x
)OS and Version?
Windows10
Versions
Repro steps
ng build --prod --aot
The log given by the failure
Mention any other details that might be useful
It's working with building without --prod --aot