-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support modules in NodeJS #201
Comments
This can be solved with dynamic import, which is supported in both cjs and esm. Lmk if anyone have already started to work on it, else I will be happy to create a pr to fix this. |
How would I dynamic import with type module?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Parbez ***@***.***>
Sent: Monday, January 10, 2022 1:34:57 PM
To: AlexzanderFlores/WOKCommands ***@***.***>
Cc: Ben Robson ***@***.***>; Author ***@***.***>
Subject: Re: [AlexzanderFlores/WOKCommands] Support modules in NodeJS (Issue #201)
This can be solved with dynamic import, which is supported in both cjs and esm. Lmk if anyone have already started to work on it, else I will be happy to create a pr to fix this.
—
Reply to this email directly, view it on GitHub<#201 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVRDWD7JYE4KNMGO5JJOZTUVJAVDANCNFSM5LQI7LPA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The issue is present in this lib not in your code. So you can create a pull request to solve the issue. You just need to change these |
Would you or someone be able to make a PR to fix this as I'm unfamiliar with the WOK library and kind of new to it?
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Parbez ***@***.***>
Sent: Monday, January 10, 2022 1:48:58 PM
To: AlexzanderFlores/WOKCommands ***@***.***>
Cc: Ben Robson ***@***.***>; Author ***@***.***>
Subject: Re: [AlexzanderFlores/WOKCommands] Support modules in NodeJS (Issue #201)
How would I dynamic import with type module? Get Outlook for Androidhttps://aka.ms/AAb9ysg
…
________________________________ From: Parbez @.> Sent: Monday, January 10, 2022 1:34:57 PM To: AlexzanderFlores/WOKCommands @.> Cc: Ben Robson @.>; Author @.> Subject: Re: [AlexzanderFlores/WOKCommands] Support modules in NodeJS (Issue #201<#201>) This can be solved with dynamic import, which is supported in both cjs and esm. Lmk if anyone have already started to work on it, else I will be happy to create a pr to fix this. — Reply to this email directly, view it on GitHub<#201 (comment)<#201 (comment)>>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADVRDWD7JYE4KNMGO5JJOZTUVJAVDANCNFSM5LQI7LPA. You are receiving this because you authored the thread.Message ID: @.***>
The issue is present in this lib not in your code. So you can create a pull request to solve the issue. You just need to change these require to import. It'll return a promise with an object like this Promise<{default: any}>. You need to change it as required.
—
Reply to this email directly, view it on GitHub<#201 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADVRDWC6H2J4IDM7DG32UC3UVJCJVANCNFSM5LQI7LPA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I have attempted to look into this and changed
|
Revert all changes you made, and if your error is "ESM_MODULE_REQUIRE" or something of that sort, just remove
|
He wants to work with module. |
Correct, and WOKCommands is not working with module, so I am looking to see how to make it universal between the 2. |
|
In this case try using the |
It's not really the solution you want but with PR #209 you can use modules except for the commands themselves, which would be |
Hey,
I've recently refactored my project from commonjs to modules and since then WOKCommands refuses to work.
Here is my error: https://sourceb.in/BBobXoD2Jr
It seems the error is in
node_modules\wokcommands\dist\FeatureHandler.js:37
I would love to use this package but it refuses to work and wouldn't want to edit the package.
The text was updated successfully, but these errors were encountered: