ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

Updating Docs in accordance with error #4130 #4170

Closed HackStrix closed 2 years ago

HackStrix commented 2 years ago

Updating IPFS-HTTP-CLIENT docs in accordance with the issue highlighted in #4130, ERR_PACKAGE_PATH_NOT_EXPORTED with ipfs-http-client and typescript.

closes #4169

welcome[bot] commented 2 years ago

Thank you for submitting this PR! A maintainer will be here shortly to review it. We are super grateful, but we are also overloaded! Help us by making sure that:

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment. Next steps:

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. We are very grateful for your contribution!

achingbrain commented 2 years ago

Thanks for opening this.

You can use import in ESM code, no need to use import(), that's only needed in older CJS code. The examples are ESM since the IPFS modules are ESM.

If you are seeing ERR_PACKAGE_PATH_NOT_EXPORTED with ipfs-http-client and typescript, please check your output settings, you're probably outputting CJS.