how to use node-fetch with AdonisJs v5? #3956
-
Hello AdonisJs! When I use node-fetch version 32.10 to call another API from Task. I got this error.
please help me resolve this. thanks this is my code:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I try with some other packages like |
Beta Was this translation helpful? Give feedback.
-
As the error message tells |
Beta Was this translation helpful? Give feedback.
As the error message tells
require() of ES modules is not supported.
. The version of the packages you are using are ESM only, so they cannot work with CommonJS modules. You need to downgradegot
to a version that supports CommonJS