Build error with Angular Universal (SSR)
See original GitHub issueHi,
I really like this component and added it to our project to add some emoji support to our community systems (like forum and chats). However, our project is also using Angular Universal. Just adding the PickerModule
to the AppModule
(which is then imported in the ServerModule
gives me this error when running npm run build:ssr
. Our stack is pretty standard with Angular 8.2.7 and ngx-emoji-mart with version 1.02.
Thank you very much for this awesome component and I hope this can be resolved quickly.
Cheers, Phillip
This is the error:
ERROR in ./node_modules/@ctrl/ngx-emoji-mart/ngx-emoji/fesm5/ctrl-ngx-emoji-mart-ngx-emoji.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/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:230:35)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:53:21)
at visitNodes (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16631:30)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16857:24)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16752:21)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16809:24)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16820:24)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16716:21)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNodes (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16631:30)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16866:24)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNode (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16622:24)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16864:21)
at checkNodeForDecorators (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:44:31)
at visitNodes (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16631:30)
at Object.forEachChild (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:16859:24)
at transformer (/Users/pschuster/Documents/Websites/fourplayers/node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js:39:16)
at transformSourceFileOrBundle (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:67384:57)
at transformation (/Users/pschuster/Documents/Websites/fourplayers/node_modules/typescript/lib/typescript.js:83586:24)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
SSR build failed issue #2449 - angular/universal - GitHub
If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and ...
Read more >Server-side rendering (SSR) with Angular Universal
This guide describes Angular Universal, a technology that renders Angular applications on the server. A normal Angular application executes in the browser, ...
Read more >How to handle Server and Client errors in Angular Universal ...
So here is were angular platform id and isPlatformServer method come into play and we can use those to take different paths on...
Read more >Page crash after converting to Angular Universal (SSR)
Sorry, I misread your question. The issue is that you're using something (I guess it's ngbRunTransition) that calls getBoundingClientRect .
Read more >Angular Universal: Complete Practical Guide
This post will be a complete practical guide for getting started with Angular Universal. We are going to go start with an existing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
🎉 This issue has been resolved in version 1.0.4 🎉
The release is available on:
Your semantic-release bot 📦🚀
I’m having the same issue using version 1.0.3 with Angular 8.3.1.
But it worked by using version 1.0.1 🤔