Closed ibaraki-douji closed 2 years ago
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
Finally, remember to use https://discuss.ipfs.io if you just need general support.
I resolved this loading the module via
const IPFS = await import('ipfs-core')
instead of requiring it.
Ok so with js it works fine but with typescript it keeps crashing ... I will try to find for typescript. Thanks man
For typescript users :
To have this error removed you need to change compilerOptions.module
to ESNext
in the tsconfig.json
If you keep CommonJS
it will transpile to a require() with a promise and it will give the error.
I resolved this loading the module via
const IPFS = await import('ipfs-core')
instead of requiring it.
@wouldgo After lost so many time searching a solution between it closed issues without reason, Your reply solved my problem, thanks for this!
Version:
ipfs-core
: 0.15.1Platform: Linux ae47c7682c9d 5.4.0-88-generic # 99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Severity:
Medium - A non-essential functionality does not work, performance issues, etc.
Description:
So i just setup the new ipfs project and when i was trying to start the program i got an error.