-
Notifications
You must be signed in to change notification settings - Fork 74
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
ES module #1184
Comments
If you're running in Node, you'll want to import the node-specific package:
You can check out this example for more guidance. If you're not in Node then please let me know more information about the environment you're in, the bundler you're using, etc. |
Feel free to re-open this ticket with more information about your platform / build setup. Ideal would be to reproduce the issue in a standalone repo or codesandbox example. |
When we tried this |
@adityapatadia Can you provide a bit more context on your environment? If you're using The node packages only support common js, which means you need to If you're using ts-node, I believe there is a tsconfig setting I can try and dig up that enables cross-compatibility (so you can do an import on a CJS module). If you are trying to use ESM modules, let me know. I made an issue to add support for ESM in node here (#671) but dropped it as I got the sense it wasn't in high demand. If it's something you need I can pick it up again. |
We are using ESM on nodejs. Require does not work there and there does not seem to be a workaround. |
@adityapatadia let's move this comment thread to #671 |
When I imported the upscaler package and started it, I got this error
Please tell me how to fix this
import upscaler from "upscaler";
The text was updated successfully, but these errors were encountered: