-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ipfs-http-client doesn't work in the browser with Meteor #3557
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
That's interesting - it's probably trying to pull node-specific code into a browser bundle. Can you configure Meteor to follow browser semantics for building the front end code? |
@achingbrain Yes, that's the case. The meteor build system is not as configurable as say webpack. They provide meteor-node-stubs which mocks some of the Node.js modules, but the I'm wondering, how does it work with webpack. Does the code which contains references to |
Webpack respects the |
Ok, turns out Meteor does respect Wouldn't it be better to specify browser specific files for a particular package in the package itself, thus reducing coupling? In this case move the declaration to |
Yes - could you please open a PR to the affected modules to make this change? It sounds like it would then also fix the issue with Meteor. |
Sure. Will do this in a few days. |
Maybe a few days more 😅 Really busy currently |
@achingbrain Just wondering, why js-ipfs-utils is not a part of this repo? |
It was briefly but it’s used in too many places so needed it’s own release schedule. |
Hi. Can you take a look at the following PRs, please: #3630, ipfs/js-ipfs-utils#121 |
Fixes this issue: ipfs/js-ipfs#3557 Related PR in `js-ipfs`: ipfs/js-ipfs#3630
To continue the discussion on #3630, I don't have a solution for
in every applicable Please confirm that my reasoning is correct and I'll make a PR. |
js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide. Please feel to reopen with any comments before 2023-06-05. We will do a final pass on reopened issues afterward (see #4336). |
Version:
49.0.2
Platform:
Linux hostname 5.10.15-1-MANJARO #1 SMP PREEMPT Wed Feb 10 10:42:47 UTC 2021 x86_64 GNU/Linux
Severity: High
Description:
I’m having troubles using the latest version of
ipfs-http-client
with Meteor on the client.It fails with:
Object prototype may only be an Object or null: undefined
.This error comes from
graceful-fs
package. The dependency flow is as following:ipfs-http-client
->ipfs-utils
->fs-extra
->graceful-fs
The latest working version is
41.0.1
.Steps to reproduce the error:
I've created a minimal reproduction of the issue. All the steps to reproduce the error are provided in README. Let me know if you need more details.
Thanks!
The text was updated successfully, but these errors were encountered: