-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Package Request] IPFS #34
Comments
Hey! Thanks for filing. It looks like IPFS is importing We have a longer-term project to up-convert these individual files from CJS to ESM (the same way we upconvert CJS packages to ESM). That would hopefully fix this issue. you could also reach out to ipfs & see if they would import these different utils from the |
Update: we released a big update to the CDN this week, and it looks like we were able to solve some of the CommonJS problems, but the package failed to build. It seems that some of its dependencies like I’ll investigate a little more, but it may be unlikely that we can get it working easily as there’s a lot of Node-specific code to all of these dependencies. We’re handling CJS a lot better, and we can handle a few common Node.js polyfills, but at a certain extent we won’t be able to run Node.js APIs in the browser (and currently a lot of these will surface as build errors or the package failing to load) |
I was going to try importing it again seeing issue 40 get closed, but you got here immediately! Thank you for continuing to investigate it. IPFS works fine in a script tag using the bundle they produce on their end which I assume includes all sorts of magic needed to do so. But the NPM package with its huge dependency tree is still just made for Webpack I guess. |
Just gave it another try after another CDN update and I’m afraid that
|
@drwpow small note, that URL should be: https://cdn.skypack.dev/ipfs/dist/index.min.js |
I believe the relevant issue on the IPFS side is: ipfs/js-ipfs#951 It might (or might not) help them if @drwpow or @FredKSchott dropped a line there what they might need to do to have a skypack build succeed. |
Apologies for bringing up an issue about a package with a terrifyingly huge dependency graph, but I can't import IPFS over Skypack.
Simply importing the package fails as somewhere in the process a require invocation slips through.
Throws:
Where
env.js
is as follows when inspected in the browser, (it's small enough):The text was updated successfully, but these errors were encountered: