Commit 624823e6 authored by Travis Fischer's avatar Travis Fischer

fix: add error message on node.js if undici isn't supported

parent 35a29847
......@@ -16,6 +16,12 @@ const fetch =
_undici = await import('undici')
}
if (typeof _undici?.fetch !== 'function') {
throw new Error(
'Invalid undici installation; please make sure undici is installed correctly in your node_modules. Note that this package requires Node.js >= 16.8'
)
}
return _undici.fetch(...args)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment