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
If we try to use this package as an ESM module in Node (without any build tool), we get errors like this:
SyntaxError: Named export 'Explorer' not found. The requested module '@ergolabs/ergo-sdk' is a CommonJS module, which may not support all module.exports as named exports.
This happens because the type or exports field is missing in package.json. Currently used module field in package.json is neither supported, nor the support is planned in Node. It was a proposal which was introduced by some bundlers like esbuild, but Node introduced a more powerful exports field.
Note that if this package is meant to be used only as an ESM module, adding a "type": "module" will suffice.
The text was updated successfully, but these errors were encountered:
If we try to use this package as an ESM module in Node (without any build tool), we get errors like this:
This happens because the
type
orexports
field is missing inpackage.json
. Currently usedmodule
field inpackage.json
is neither supported, nor the support is planned in Node. It was a proposal which was introduced by some bundlers likeesbuild
, but Node introduced a more powerfulexports
field.Note that if this package is meant to be used only as an ESM module, adding a
"type": "module"
will suffice.The text was updated successfully, but these errors were encountered: