SAP-samples / ui5-typescript-walkthrough

A walkthrough tutorial that introduces all major development paradigms of OpenUI5 using TypeScript with OpenUI5.
https://sap-samples.github.io/ui5-typescript-walkthrough/
Apache License 2.0
26 stars 19 forks source link

Maximum call stack size exceeded on ui5 serve and ui5 build #11

Closed abf-martinc closed 6 months ago

abf-martinc commented 6 months ago

Hello,

I was trying your tutorial on ui5 typescript. https://openui5.hana.ondemand.com/topic/be33d0120da1491baa490fc01eaaf018

Although without changing your source i was not able to run the code. Either with the commands "ui5 serve" nor "ui5 build". It will always stop with an error: "Maximum call stack size exceeded"

I even tried to set up fresh in a VM with Linux MINT, as I thought it might be an installation issue. But I get the same problems there. Also I cannot run ui5 build on your last step of the Walkthrough with (just) JavaScript. Same Error. https://openui5.hana.ondemand.com/topic/ae1be8cc26064274bbc5925a9cd59640

"ui5 serve" works when i remove "ui5-middleware-serveframework": "^3.0.0" from the installation and ui5.yaml middleware. "ui5 build" won't work event with this..

I am using the latest version of node 22.0.0 and npm 10.6.0.

Here is the output on the terminal:

npm run build

ui5.walkthrough.step38@1.0.0 build ui5 build --all --clean-dest

info graph:helpers:ui5Framework Using OpenUI5 version: 1.120.1 info ProjectBuilder Preparing build for project ui5.walkthrough info ProjectBuilder Target directory: ./dist info ProjectBuilder Including all dependencies info ProjectBuilder Processing 6 projects info ProjectBuilder Cleaning target directory... info Project 1 of 6: ❯ Building library project sap.ui.core... info sap.ui.core › Running task escapeNonAsciiCharacters...

⚠️ Process Failed With Error

Error Message: Maximum call stack size exceeded

For details, execute the same command again with an additional '--verbose' parameter (The --verbose parameter won't change anything in the output)

We really need to switch to a newer UI5 version, prefered with TypeScript!!

Please help!

petermuessig commented 6 months ago

@matz3 @RandomByte @flovogt - there's a problem with the UI5 build and Node version 22. When switching to Node version 22 and running npm run build which finally calls ui5 build then this causes the Maximum call stack size exceeded issue. Can one of you please take a look? The issue happens already in the first executed task escapeNonAsciiCharacters.

matz3 commented 6 months ago

This looks like a Node.js regression that has been fixed yesterday via https://github.com/nodejs/node/pull/52708.

@abf-martinc please consider using a LTS version of Node.js for productive usage.

petermuessig commented 6 months ago

In this case, I think we can close the issue here. Thanks @matz3