Skip to content
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

require() of ES Module not supported - use dynamic import() instead #4

Open
Bagameri opened this issue Nov 12, 2023 · 1 comment
Open

Comments

@Bagameri
Copy link

Hi,

I'm using installation node-v20.9.0-x64.msi
Getting error for 'yo btp-diagram-icons'

C:\Users\I806753\Documents>yo btp-diagram-icons
Error btp-diagram-icons

require() of ES Module C:\Users\I806753\AppData\Roaming\npm\node_modules\generator-btp-diagram-icons\node_modules\svgdom\main-module.js from C:\Users\I806753\AppData\Roaming\npm\node_modules\generator-btp-diagram-icons\generators\app\index.js not supported.
Instead change the require of main-module.js in C:\Users\I806753\AppData\Roaming\npm\node_modules\generator-btp-diagram-icons\generators\app\index.js to a dynamic import() which is available in all CommonJS modules.
TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('ERR_REQUIRE_ESM')

@superwangnan
Copy link

The same error ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants