- 000
Hi, im using Node.js 20.2.0 and trying to fetch local file like this:
fetch(new URL('./data.json', import.meta.url))
.then(res => res.json())
.then(console.log);
But it is not worked and i get error:
$ node test.node.mjs
node:internal/deps/undici/undici:11522
Error.captureStackTrace(err,...