-
Notifications
You must be signed in to change notification settings - Fork 396
Subql Cli failed issue Error: require() of ES Module.. #1211
Unanswered
jiqiang90
asked this question in
SDK issues
-
If you have encounter with issue when using subql command line tool,
Error: require() of ES Module .../project/node_modules/node-fetch/src/index.js from .../project/node_modules/native-fetch/src/index.js not supported.
Instead change the require of .../project/node_modules/node-fetch/src/index.js in .../project/node_modules/native-fetch/src/index.js to a dynamic import() which is available in all CommonJS modules.
Code: ERR_REQUIRE_ESM
this is due to one of the cli tool dependencies node-fetch has been updated and only support ES module from 3.x.x
To fix this:
- If you are on cli 1.3.0, please update the 1.3.1 to resolve this issue.
- if you used
npmfor install, you can change toyarnto fix this issue. - if this issue remains in your subquery project, you can add
node-fetch: 2.6.7to your package.json, also useresolutionto fix the version. - more questions please leave message below or contact us directly on Discord technical support.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment