r/node • • Feb 01 '22

Fetch API has landed into Node.js

https://github.com/nodejs/node/commit/6ec225392675c92b102d3caad02ee3a157c9d1b7
280 Upvotes

31 comments sorted by

View all comments

Show parent comments

13

u/Solonotix Feb 01 '22

Isn't ESM the "way forward" for Node.js? I've seen tons of posts a out how TypeScript allows use of modules, and that's always seen as a good thing, but then discussion of ESM always seems to be met with disdain.

4

u/Zipdox Feb 01 '22

I don't care if it's "the way forward". My program uses CommonJS and now it's broken because it suddenly changed.

0

u/[deleted] Feb 01 '22

[deleted]

2

u/spazz_monkey Feb 01 '22

Can you care to explain how to fix it with node and typescript. I get told I'm importing it wrong, but it's the exact same way importing everything else.