DEV Community

Thiago
Thiago

Posted on

Error: require() of ES modules is not supported when importing node-fetch

Você tem duas alternativas para resolver esse problema:
You've two options to fix it:

  1. No seu terminal instale uma versão antiga do node-fetch: npm install node-fetch@2

  2. At yout terminal, install a old version of node-fetch: npm install node-fetch@2

  3. No seu package.json, configure o seu projeto para suportar módulos assim: "type": "module"

  4. At your package.json file, set the project type to support module.

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more