-
Notifications
You must be signed in to change notification settings - Fork 2
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
Don't work with require #311
Comments
Hi @modox94, Can you please tell me your dev environment? Node version, are you using ESM, and MAL Api SDK version? Thank you! |
Hi. I attached package files to message. I use CJM at this repo. I tried to use your package with ESM and it works fine, but I need CJM support. |
Noted, I'll try to find a way on how to make this work with CJS. Thank you for reporting! |
Hi @modox94, Thank you for waiting, I have consulted with some of my friends that have better understanding with ESM and I have read some blogs about it too. Apparently it's not possible to use newer Got with CJS. This project uses newer Got, so I need to update it to ESM too. You can actually use dynamic import to replace the That being said, since I do not use their deeper APIs, I kind of want to try to support older Got version (v11) that still support CJS as well. Hopefully it can still work with this library. But In the future, I'll drop support for CJS because older got is no longer actively supported. I made mistake when bumping up the major version by not removing the CJS build i copied from my older library project. I'm sorry :(. I'll update you with my findings. Thank you! |
Hi @modox94, I've published new version so that you can use To install this new version with older version of got, you can run following commands: yarn add @chez14/mal-api-lite@^1.2.7 got@^11.8
## or NPM
npm i -s @chez14/mal-api-lite@^1.2.7 got@^11.8 && npm dedupe Thank you! |
Can'r import this package with
require
. Everything ok with modernimport
.The text was updated successfully, but these errors were encountered: