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

Change module to commonjs #197

Open
0x6368656174 opened this issue Feb 10, 2025 · 2 comments
Open

Change module to commonjs #197

0x6368656174 opened this issue Feb 10, 2025 · 2 comments

Comments

@0x6368656174
Copy link

0x6368656174 commented Feb 10, 2025

Your library is published with "type": "module and your telnyx.node.js is built in ECMAScript module format, but it makes your library hard to use in classic node.js application that uses commonjs module import (wich is the most). It forces us to use const telnyx = await import('telnyx') syntax, which is super inconvenient. I understand your willing to build a new modern library that will work only with new applications that are built in ESM format, but the reality is different and the most node.js application still uses require syntax.

May we ask you to consider changing the package.json "type" to a more classic "commonjs" that will allow anyone to use your library comfortably?

@dmmc12
Copy link

dmmc12 commented Feb 11, 2025

Thank you for bringing this up. We’ll review internally and assess whether it's a possible consideration for supporting CommonJS with our new SDK version. We’ll follow up with any updates as soon as they are received.

@lucasassisrosa
Copy link
Contributor

We were moving forward with "type": "module" because ECMAScript module is the default for Node. I can set it to commonjs if it’s a common request from users. We'll let you know once a new version is available

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

No branches or pull requests

3 participants