You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ cat package.json
{
"type": "module",
"devDependencies": {
"cross-fetch": "^3.1.4"
}
}
❯ cat index.js
import "cross-fetch/polyfill";
❯ node --experimental-specifier-resolution=node index.js
node:internal/process/esm_loader:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/perrin4869/univapay/cross-fetch-esm/node_modules/cross-fetch/polyfill' imported from /home/perrin4869/univapay/cross-fetch-esm/index.js
Did you mean to import cross-fetch-esm/node_modules/cross-fetch/dist/node-polyfill.js?
at new NodeError (node:internal/errors:363:5)
at finalizeResolution (node:internal/modules/esm/resolve:296:11)
at moduleResolve (node:internal/modules/esm/resolve:742:10)
at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:853:11)
at Loader.resolve (node:internal/modules/esm/loader:89:40)
at Loader.getModuleJob (node:internal/modules/esm/loader:242:28)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:73:40)
at link (node:internal/modules/esm/module_job:72:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Not sure if this should be treated as a node bug or as a cross-fetch bug though...
The text was updated successfully, but these errors were encountered:
Reproducible on latest node 16.3.0:
Not sure if this should be treated as a node bug or as a
cross-fetch
bug though...The text was updated successfully, but these errors were encountered: