-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template Wizard fails running ESM-based Easy UI5 generator #850
Comments
@idoprz @tomer-epstein @rimasirich @alex-gilin - maybe one of you can have a look into this issue and we can discuss this? I'm still unsure what to do? Transpiling the code back to CJS is also an option but this would also mean to downport dependencies as dynamic imports can't be used as well. I need to understand the way you run the template a bit more in detail to judge what the best option would be for Easy UI5 to run again with the Template Wizard. THX. Cc: @nicoschoenteich |
@petermuessig It seems that adding support for ESM is high effort task. I suggest we have a meeting with @rimasirich , @alex-gilin & Avital the PO to discuss the options |
@idoprz - I'm open to meet and discuss the options. 👍 |
@petermuessig The issue with the Template Wizard failing to run the ESM-based Easy UI5 generator is due to the fact that the VS Code loader has not been updated to support ES modules in extensions, preventing yeoman-ui from adopting the new module system. Unfortunately, I cannot see a confirmed timeline for when the VS Code team will address this limitation. You can follow microsoft/vscode#130367 for updates on this matter. |
When trying to use the Template Wizard in VSCode or BAS for the Easy UI5 generator it immediately crashes with the following error message:
This states that ESM-based generators are not supported by Yeoman UI. Are there any plans to change that? As more and more NPM packages are ESM-based a change to ES modules helped to simplify the code a lot.
I tried to create a proxy generator which dynamically requires the ESM-based Easy UI5 generator. Unfortunately, without success as the dynamic import statement leads to the following error:
To verify the issue a bit more in depth, I made a very basic ESM-based generator:
in this case it now fails with the following error message:
So, basically the environment in which the generators are executed seem to assume CJS modules and not ESM and ESMs are not supported there as
import
or dynamic importimport(...)
statements are not supported there. Are there any intentions to support ESM-based generators by the Template Wizard in the future? I would assume that more and more generators will adopt to ESM as it is now also in general supported by Node.js.The text was updated successfully, but these errors were encountered: