Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

ERR_REQUIRE_ESM with orbit-db-io 1.1.1-bac86ca.0 #39

Open
cs145442 opened this issue Jul 21, 2022 · 3 comments
Open

ERR_REQUIRE_ESM with orbit-db-io 1.1.1-bac86ca.0 #39

cs145442 opened this issue Jul 21, 2022 · 3 comments

Comments

@cs145442
Copy link

Hello Collaborators,
I'm experiencing issues with the latest update of orbit-db-io, which is a dependency for orbit-db.

Error [ERR_REQUIRE_ESM]: require() of ES Module /<project-path>/node_modules/orbit-db-io/index.js from /<project-path>/node_modules/ipfs-log/src/utils/index.js not supported.

Instead change the require of /<project-path>/node_modules/orbit-db-io/index.js in /<project-path>/node_modules/ipfs-log/src/utils/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/<project-path>/node_modules/ipfs-log/src/utils/index.js:6:12)
at Object.<anonymous> (/<project-path>/node_modules/ipfs-log/src/entry.js:4:27)
at Object.<anonymous> (/<project-path>/node_modules/ipfs-log/src/log.js:5:15)
at Object.<anonymous> (/<project-path>/node_modules/orbit-db-store/src/Store.js:7:13)
at Object.<anonymous> (/<project-path>/node_modules/orbit-db/src/OrbitDB.js:4:15)
at Object.<anonymous> (/<project-path>/<filename>.js:11:17) { code: 'ERR_REQUIRE_ESM'
}

Node.js v18.5.0

Hope can will be resolved soon. Thanks.

@aphelionz
Copy link
Contributor

Thanks for this - are you getting this from a simple npm install orbit-db?

@AlexMesser
Copy link

Same here and yes, just from a simple npm install orbit-db. As a workaround added "orbit-db-io": "1.0.1" dependency in my project package.json.

@cs145442
Copy link
Author

cs145442 commented Aug 1, 2022

@aphelionz I'm afraid so, yes!
As a work-around I had to override and rely on the previous working version since this issue.

image

julienmalard added a commit to reseau-constellation/ipa that referenced this issue Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants