-
Notifications
You must be signed in to change notification settings - Fork 33
TypeError: blocks.map is not a function #21
Comments
@ceslabdocker the example was out of date due to #20. I've created a PR to resolve this, #22, and I believe it should resolve your issue. Can you verify this resolves the problem you're having? |
Hi Jacobheun, I am using ipfs 0.39.0 and ipfs-repo 0.29.2. But still getting the same error. |
Can you run I noticed in your logs above the error is coming from |
Working fine with the suggested ipfs and ipfs-repo version. But want to understand the purpose of this module. This module description specified as "Datastore implementation with S3 backend". How we can utilize this backend data? |
The purpose is simply to allow you to leverage S3 as your IPFS datastore instead of using the local filesystem. This is useful when running an IPFS node on EC2 or similar, as you don't have to store data directly on the container. If you don't have a need to keep your data separately from your node, then it might be better to use the filesystem datastore (which is used automatically for node.js implementations). |
Thanks jacobheun for your help. :) |
Hi Team,
We are getting the following error while executing the example index.js.
(node:19572) UnhandledPromiseRejectionWarning: TypeError: blocks.map is not a function
at Object.putMany (/home/ubuntu/node_modules/ipfs-repo/src/blockstore.js:92:27)
at Bitswap.putMany (/home/ubuntu/js-datastore-s3/examples/full-s3-repo/node_modules/ipfs-bitswap/src/index.js:282:28)
at Bitswap.put (/home/ubuntu/js-datastore-s3/examples/full-s3-repo/node_modules/ipfs-bitswap/src/index.js:269:17)
at BlockService.put (/home/ubuntu/js-datastore-s3/examples/full-s3-repo/node_modules/ipfs-block-service/src/index.js:61:28)
at IPLDResolver.put (/home/ubuntu/js-datastore-s3/examples/full-s3-repo/node_modules/ipld/src/index.js:196:21)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async loadMfsRoot (/home/ubuntu/js-datastore-s3/examples/full-s3-repo/node_modules/ipfs-mfs/src/core/utils/with-mfs-root.js:34:11)
at async toMfsPath (/home/ubuntu/js-datastore-s3/examples/full-s3-repo/node_modules/ipfs-mfs/src/core/utils/to-mfs-path.js:16:16)
at async mfsStat (/home/ubuntu/js-datastore-s3/examples/full-s3-repo/node_modules/ipfs-mfs/src/core/stat.js:23:9)
(node:19572) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside
Please help us to solve this error.
The text was updated successfully, but these errors were encountered: