You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Latest node-fetch is only compatible with ESM modules. Reverting to old node-fetch would work as long as other vulnerable spots are covered.
Error:
> [email protected] start
> node app.js
Gitwar/utils/fetchTrending.js:2
const fetch = require("node-fetch");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /Gitwar/node_modules/node-fetch/src/index.js from /Gitwar/utils/fetchTrending.js not supported.
Instead change the require of index.js in /Gitwar/utils/fetchTrending.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/Gitwar/utils/fetchTrending.js:2:15)
at Object.<anonymous> (/Gitwar/routes/top.js:6:31)
at Object.<anonymous> (/Gitwar/app.js:40:19) {
code: 'ERR_REQUIRE_ESM'
}
Reverting to older version of node-fetch should do the job!
The text was updated successfully, but these errors were encountered:
Latest
node-fetch
is only compatible with ESM modules. Reverting to old node-fetch would work as long as other vulnerable spots are covered.Error:
Reverting to older version of node-fetch should do the job!
The text was updated successfully, but these errors were encountered: