Replies: 3 comments 1 reply
-
Try https://github.com/nats-io/nats.ws/blob/main/developer_notes.md#older-typescript-compiler |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. I tried the options you suggested. I am using Angular version 12 and have enabled server-side rendering (SSR). There is no problem when I create a regular build using "ng build"; it completes without any errors. However, when I run the following command for the SSR build: "ng build && ng run angular-nats-app:server" - (npm run build:ssr) it creates two bundles: a browser bundle and a server bundle. While there is no issue with the browser bundle, the server bundle throws an error. Additionally, I observed that if I change the target version to ES2017 or higher, the same error appears in the regular build (ng build) as well. The following repository contains a simple, reproducible code example. https://github.com/Ramesh-Mu/angular-nats-ssr.git I would appreciate any input on this issue. Thank you. |
Beta Was this translation helpful? Give feedback.
-
I was able to resolve the server build issue in Angular SSR by setting the target to ES2016 in tsconfig.server.json. Although this fix addresses the build issue, it may not fully leverage the latest ES module features and could result in less efficient performance optimizations and limited utilization of new features. I would like the nsts.ws plan to support the latest version of ES modules to ensure better optimization and take advantage of the most recent language features |
Beta Was this translation helpful? Give feedback.
-
I’m using Angular 12 along with the latest version of nats.ws. I didn’t encounter any build issues during the normal build process, but when I enable server-side rendering, I get the following error in the server-side build:
./node_modules/nats.ws/esm/nats.js:7472:16 - Error: Module parse failed: Unexpected token (7472:16)
File was processed with these loaders:
You may need an additional loader to handle the result of these loaders.
| _asyncToGenerator(function* () {
| try {
| _this12.parser.parse(b);
| }
Has anyone faced similar issues and found a solution that might help me?
Beta Was this translation helpful? Give feedback.
All reactions