Add yarn ipfs command to deploy on IPFS#1030
Conversation
| } | ||
| } catch (error) { | ||
| console.log(error); | ||
| console.error("❌ IPFS is not installed or daemon is not running."); |
There was a problem hiding this comment.
Is it possible to avoid daemon? For example using https://web3.storage/docs/w3up-client/ or https://docs.storacha.network/w3up-client/ ? Asking without trying, but probably it simplifies DX
There was a problem hiding this comment.
Yeah, that is a valid concern, but I wanted to keep everything manual just for the sake of showing that it can be done this way.
|
Thanks @portdeveloper !! Could you update this using the nifty ink server? I know it doesn't work (because of how that server is configured), but we are working on a proper BG IPFS network of nodes, so when the time is right (probably in a week or so) it'd be a matter of replacing the nifty ink URL. cc @rin-st (because of #1030 (comment)) |
Pabl0cks
left a comment
There was a problem hiding this comment.
Nice job @portdeveloper !!
Just tried the previous version before 1547922 on Windows environment, and ran into a couple of issues, I had to do this in order to run yarn ipfs:
- Renamed
deploy-ipfs.jsto.mjsbecause i was getting aCannot use import statement outside a moduleerror. Then updatedpackage.jsonaccordingly - Created the out folder manually as it wasn't being generated automatically during the build process.
After that it deployed to ipfs nicely with my IPFS Desktop app running 🙏
|
Thanks for testing @Pabl0cks ! Changing the script name to mjs really makes sense here, I have added the commit. But I wonder why the out folder is not created automatically.
|
|
@portdeveloper working great!! I have the same issue with the out folder: Uploading to Nifty Ink IPFS... I had to create it manually. When and where should it be created? |
|
@damianmarti Thanks for the feedback I am looking into it right now! |
|
Alright sorry about the weird bug! I should've tested it more before you tried it out. It is now fixed |
Working great now! Thanks!! |
|
Closing this because of #1030, but thanks so much Port for tinkering and PR 🙏 |
This PR:
-> Adds
yarn ipfscommand to the package.json-> Modifies
next.config.jsto populateoutfolder whenyarn ipfsis run-> Adds a
deploy-ipfs.jsfile under packages/nextjs/scriptsThe user has to have an ipfs daemon running for the initial uploading.
Here is an example I deployed using this script + eth.limo
https://pallas-athena.eth.limo/
it should be garbage collected after some time but it has been up almost for a week now.