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

18 Replies, 899 Views

Check your file extensions! If you’re using `.js` with `"type": "module"`, it should work.

But if you’re mixing `.js` and `.mjs`, Node gets confused. Stick to one.

Also, `node --version` to confirm you’re on Node 14+. Older versions are a nightmare with import from node-fetch.

Messages In This Thread



Users browsing this thread: 1 Guest(s)