Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace ipfs-http-client with kubo-rpc-client #1959

Closed
wants to merge 1 commit into from

Conversation

guplersaxanoid
Copy link
Contributor

Description

with ipfs-http-client deprecated, replace it with kubo-rpc-client

Fixes #1928

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have tested locally
  • I have performed a self review of my changes
  • Updated any relevant documentation
  • Linked to any relevant issues
  • I have added tests relevant to my changes
  • Any dependent changes have been merged and published in downstream modules
  • My code is up to date with the base branch
  • I have updated relevant changelogs. We suggest using chan

@@ -11,7 +11,7 @@
"experimentalDecorators": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"lib": ["ES2017", "ES2020"],
"lib": ["ES2017", "ES2020", "DOM"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right. We're not running this in the browser

Copy link
Collaborator

@stwiname stwiname left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the same need to be done to the node for when we load projects?

@stwiname
Copy link
Collaborator

I cant get this to run:

➜ ./bin/run publish -f ~/Projects/subql-starter/Polkadot/Polkadot-starter
(node:94909) [ERR_REQUIRE_ESM] Error Plugin: @subql/cli [ERR_REQUIRE_ESM]: require() of ES Module /Users/scotttwiname/Projects/subql/node_modules/kubo-rpc-client/dist/src/index.js from /Users/scotttwiname/Projects/subql/packages/cli/src/controller/publish-controller.ts not supported.
Instead change the require of index.js in /Users/scotttwiname/Projects/subql/packages/cli/src/controller/publish-controller.ts to a dynamic import() which is available in all CommonJS modules.
module: @oclif/config@1.18.3
task: toCached
plugin: @subql/cli
root: /Users/scotttwiname/Projects/subql/packages/cli
See more details with DEBUG=*
(Use `node --trace-warnings ...` to show where the warning was created)
 ›   Error: command publish not found

@stwiname
Copy link
Collaborator

Blocked by ipfs/js-kubo-rpc-client#162 and needing to use ESM

@stwiname
Copy link
Collaborator

I think we can close this. There's a bigger problem with needing to switch to ESM

@stwiname stwiname closed this Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade the IPFS client library
2 participants