gatsby-plugin-ipfs icon indicating copy to clipboard operation
gatsby-plugin-ipfs copied to clipboard

Support for Gatsby v4

Open samajammin opened this issue 2 years ago • 8 comments

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?

samajammin avatar Oct 22 '21 12:10 samajammin

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?

satazor avatar Oct 22 '21 13:10 satazor

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?

chrisschaub avatar Mar 09 '22 20:03 chrisschaub

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

justinh00k avatar Jun 24 '22 20:06 justinh00k

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

chrisschaub avatar Jun 25 '22 03:06 chrisschaub

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 avatar Sep 21 '22 13:09 johnda98

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

johnda98 avatar Sep 21 '22 13:09 johnda98

@satazor I created a PR that fixes the issue here https://github.com/moxystudio/gatsby-plugin-ipfs/pull/26

Odin94 avatar Oct 25 '22 21:10 Odin94

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?

ljrahn avatar Dec 20 '22 22:12 ljrahn