Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

require$$2.bind is not a function after vite build, works during vite dev #4343

Closed
boid-com opened this issue Apr 11, 2023 · 3 comments
Closed
Assignees

Comments

@boid-com
Copy link

boid-com commented Apr 11, 2023

  • Version:
    {version: '0.18.0', commit: '', repo: '12', ipfs-core: '0.18.0', interface-ipfs-core: '^0.158.0'}

  • Platform:
    Chrome, Macos

Severity:

Critical - System crash, application panic.

Description:

  • What you did
    include ipfs-core in a quasar vite project
  • What happened
    works during development but not after build
  • What you expected to happen
    should operate the same during dev and build

Steps to reproduce the error:

  • include ipfs-core in a quasar vite project
  • yarn quasar build
  • try and visit the built site
  • site won't render due to ipfs error\

Error trace

TypeError: require$$2.bind is not a function
    at ipfs.8f5ba8b6.js:17:314645
y @ index.cff37d5b.js:556
(anonymous) @ index.cff37d5b.js:556
Promise.catch (async)
$ @ index.cff37d5b.js:556
N @ index.cff37d5b.js:556
install @ index.cff37d5b.js:556
use @ index.cff37d5b.js:1
EM @ index.cff37d5b.js:556
await in EM (async)
(anonymous) @ index.cff37d5b.js:556
Promise.then (async)
(anonymous) @ index.cff37d5b.js:556
Promise.then (async)
(anonymous) @ index.cff37d5b.js:556
@boid-com boid-com added the need/triage Needs initial labeling and prioritization label Apr 11, 2023
@welcome
Copy link

welcome bot commented Apr 11, 2023

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:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@alan890104
Copy link

I solved this problem by upgrading vite to 4.3.3.
Here is my repo.

@SgtPooki SgtPooki added kind/unknown-in-helia and removed need/triage Needs initial labeling and prioritization labels May 16, 2023
@SgtPooki
Copy link
Member

SgtPooki commented May 16, 2023

Hello @boid-com,

js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and the corresponding migration guide here.

There is also an example of using helia with vite at https://github.com/ipfs-examples/helia-examples/tree/main/examples/helia-vite.

As a result, we are going to close this issue. If you think we have done this in error, please feel to reopen with any comments in the next week as we will circle back on the reopened issues.

We hope you will consider Helia for your IPFS in JS needs. If you believe this particular request belongs in Helia, feel free to open a Helia issue. We look forward to engaging with you more there.

Thanks,
@ipfs/helia-dev

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants