4 ms·
> loathe how major packages in the ecosystem are "We're ESM now, deal with it, sorry about your luck," and forcing the issue I wasn’t able to use the latest ve
by devmunchies 5y ago
> loathe how major packages in the ecosystem are "We're ESM now, deal with it, sorry about your luck," and forcing the issue
I wasn’t able to use the latest version of node-fetch in a node.js script since it doesn’t support commonjs. The project literally has “node” in the name and doesn’t support default node.js.
- theprotocol 5y agoI just encountered this. FYI You can use v2 which still retains commonjs support.
- andrew_ 5y agoI've ended up using last major versions as well. I plan to move to Deno anyhow, and authors like sindresorhus are at least applying security updates to the major version before the switch.
- spankalee 5y agoWere you not able to convert the script to a module, or dynamically import() node-fetch? Since you're using it for an async operation anyway, dynamic import should have worked quite well.