Error [ERR_REQUIRE_ESM]: require() of ES Module … not supported

The current version of node-fetch is ONLY compatible with an ESM import (using import), not from CommonJS modules using require(). You have these choices to fix: Switch your project to an ESM module and load it with import fetch from ‘node-fetch’;. In a very recent version of nodejs, you can dynamically import an ESM module … Read more

Send a message with Discord.js

The send code has been changed again. Both the items in the question as well as in the answers are all outdated. For version 12, below will be the right code. The details about this code are available in this link. To send a message to specific channel const channel = <client>.channels.cache.get(‘<id>’); channel.send(‘<content>’); To send … Read more

Error [ERR_REQUIRE_ESM]: require() of ES Module not supported [duplicate]

The node-fetch latest version doesn’t use the require() syntax to import the package. You need to go to your package.json and type { “type”: “module”, } to use the import syntax and import node-fetch, but then you can’t use require for any other packages. You need to work with import statement only. Or you can … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)