This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in node_modules/ipfs/package.json #4256
Closed
Description
[email protected]
made the jump to become ESM-only. If you are seeing the error message above, it's because you are trying to load ESM code using require
from a CJS environment.
Instead you need to either convert your code to ESM and use import
, or use the dynamic import
function if you cannot convert to ESM.
Please see the upgrade guide for more information.
Note if you are authoring TypeScript and using import
you also need to ensure that your tsc
settings result in ESM and not CJS.
Please see the TypeScript section of the upgrade guide for more information.