Having trouble with import from node-fetch? Common issues and fixes? or How to properly use import fr

18 Replies, 913 Views

Yo! Ran into this exact issue. Here’s what worked for me:

1. Delete `node_modules` and `package-lock.json`
2. Reinstall everything (`npm install`)
3. Use `import fetch from 'node-fetch';`

Sometimes the cache just gets weird. Also, check if you’re mixing require() and import—that can cause chaos.

Messages In This Thread



Users browsing this thread: 1 Guest(s)