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

Missing CJS Support #6

Open
guyedry1 opened this issue May 27, 2024 · 2 comments
Open

Missing CJS Support #6

guyedry1 opened this issue May 27, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@guyedry1
Copy link

Hi. Thanks a lot for this amazing library!
Im using pkg and it requires to use ESM module.
im import using:
const tlsClient =require('tlsclientwrapper'); and getting this error:
Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules\tlsclientwrapper\index.js
code: 'ERR_REQUIRE_ESM'
}

thanks!

@DemonMartin
Copy link
Owner

Correct. The module does not support CJS. ESM is the new standard. In the past, I tried to add CJS support to the module, but I haven’t found a way to correctly convert all the code. Therefore, I decided to keep ESM.

I have tried multiple ways to create an .exe file, and none have worked.

Deno Compiler, Bun Compiler, NodeJS Compiler, Nexe, PKG, etc.

Feel free to open a pull request if you want to add correctly working CJS using something similar to esbuild, babel, or webpack. However, I haven’t been able to do it.

@DemonMartin DemonMartin changed the title Importing error. Missing CJS Support May 27, 2024
@guyedry1
Copy link
Author

Thanks for the quick answer. I will update if i find any way.

@DemonMartin DemonMartin added enhancement New feature or request help wanted Extra attention is needed labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants