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

Support for Gatsby v4 #25

Open
samajammin opened this issue Oct 22, 2021 · 8 comments
Open

Support for Gatsby v4 #25

samajammin opened this issue Oct 22, 2021 · 8 comments

Comments

@samajammin
Copy link

Hey - thanks for creating this plugin!

I just created a new (v4) Gatsby site. When I try to install this plugin I receive this error:

~/code/ef/gatsby-ipfs on  master via ⬢ v14.17.6
➜ npm i --save gatsby-plugin-ipfs
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"^4.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^2.0.0" from [email protected]
npm ERR! node_modules/gatsby-plugin-ipfs
npm ERR!   gatsby-plugin-ipfs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Seems we'll need to upgrade this plugin to work with v4?

@satazor
Copy link
Contributor

satazor commented Oct 22, 2021

If it does work correctly for gatsby 4 out of the box, yes we can just update the peer dependency.

Does it work correctly so far?

@chrisschaub
Copy link

I can get it to run, but after the build, pages have this error:

Uncaught SyntaxError: missing ) after argument list

the error is in the gatsby core file loader.js. Not sure why yet, maybe something different with how v4 renders and caches pages?

@justinh00k
Copy link

@chrisschaub did you find a solution to this? it's exactly where i'm at.

@chrisschaub
Copy link

I did not. I think it's the plugin lagging behind Gatsby versions. I'll try to have a look in a bit.

@johnda98
Copy link

johnda98 commented Sep 21, 2022

any update on this guys ? .. since I have npm <7 I get warnings that ipfs plugin(i have ver 2.0.2) is not cool with gatsby 4.11.1..

soooo.. site comes up BUT.. some links seem to not work.. especially file downloads

is the workaround to back off the gatsby version back to 2. ? or did the ipfs plugin get upgraded so its cool with 4.11.1 ?

thanks in advance

UPDATE.. trying new ipfs dependency as on gatsby site.. gatsby-plugin-runtime-path-prefix. for ipfs/ swarm. v 2.0.1

@johnda98
Copy link

Hey - thanks for creating this plugin!

I just created a new (v4) Gatsby site. When I try to install this plugin I receive this error:

~/code/ef/gatsby-ipfs on  master via ⬢ v14.17.6
➜ npm i --save gatsby-plugin-ipfs
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"^4.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^2.0.0" from [email protected]
npm ERR! node_modules/gatsby-plugin-ipfs
npm ERR!   gatsby-plugin-ipfs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Seems we'll need to upgrade this plugin to work with v4?

you were running npm 7+ ? see I just got warnings because I am running npm < v7. .. BUT.. I still get a site that doesnt have all file download links working.. site comes up ok and compiles ok with warnings.. but misbehaves

@Odin94
Copy link
Contributor

Odin94 commented Oct 25, 2022

@satazor I created a PR that fixes the issue here #26

@ljrahn
Copy link

ljrahn commented Dec 20, 2022

everything boots fine for me, no errors, link works fine using brave ipfs browser, but i cant get it to work on any public gateway. Link either removes the hash from the endpoint, or the page never loads. Even with @Odin94 pr. you guys have same issue?

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

No branches or pull requests

7 participants