-
Notifications
You must be signed in to change notification settings - Fork 936
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
Add yarn ipfs command to deploy on IPFS #1030
base: main
Are you sure you want to change the base?
Conversation
} | ||
} catch (error) { | ||
console.log(error); | ||
console.error("❌ IPFS is not installed or daemon is not running."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.js
to.mjs
because i was getting aCannot use import statement outside a module
error. Then updatedpackage.json
accordingly - 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! |
This PR:
-> Adds
yarn ipfs
command to the package.json-> Modifies
next.config.js
to populateout
folder whenyarn ipfs
is run-> Adds a
deploy-ipfs.js
file 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.