moxystudio / gatsby-plugin-ipfs Goto Github PK
View Code? Open in Web Editor NEWAdds support for deploying Gatsby to IPFS by ensuring that assets are relative
License: MIT License
Adds support for deploying Gatsby to IPFS by ensuring that assets are relative
License: MIT License
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 need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
When public folder is put into ipfs the images don't render on the first page load. Seems that they only appear after a browser/page refresh.
Here's a screencast of the behavior. Not sure how to better describe this behavior. Does this happen to you @satazor? Not sure if this is a local to my ipfs node or not. I haven't yet found a pinner that I can test this on.
https://screencast.com/t/Xhw7MZxsJ . <-- requires flash, I know. I know. Sorry
Tried to do npm install --save gatsby-plugin-ipfs
and was greeted with this error:
npm WARN tar ENOENT: no such file or directory, open '/home/trout/work/personal/gatsby-starter-markdown/node_modules/.staging/antd-15f42b60/dist/antd-with-locales.js.map'
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/har-validator/-/har-validator-5.1.2.tgz
npm ERR! 404
npm ERR! 404 '[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'gatsby-starter-markdown'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/trout/.npm/_logs/2019-04-11T15_06_50_562Z-debug.log
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
Hello moxystudio,
I installed this plugin, but then it didn't work, so I uninstalled it, but. now my gatsby build won't work. It keeps failing on the images.
" ERROR
Failed to retrieve metadata from image /Users/maxgrok/Documents/maxgrok/maxgrok.github.io/src/pages/articles/2019-11-10---One-Hundred-And-Eighth-Post copy/buddy-ci(1).png Input file contains unsupported image format
Error: Input file contains unsupported image format"
Any ideas?
I've tried rm -r .cache and cleaning the public folder. I've tried reinstalling gatsby-cli globally after an uninstall. I've tried version 10 of node, v12, v13.6.0...I'm not sure what to do. Could you please advise?
Looks like static images aren't getting prefixed.
Could it be as simple as adding static directory to gatsby-node.js line 74
const relativizeMiscAssetFiles = async () => {
// Replaces all /__GATSBY_IPFS_PATH_PREFIX__/ strings to standard relative paths
const paths = await globby(['public/**/*', '!public/**/*.html', '!public/**/*.js']);
Currently the manifest file is not getting the prefix replaced. I think it's safe just to remove it since it's already relative. Looking at this line, it looks like if we add a special case for a .webmanifest
file that removes it the URLs for the icons should be fine.
Let me know if that makes sense, I can try creating a PR for it if you think that's the right direction.
So I'm trying to deploy the Gatsby Starter Blog to IPFS. I follow the instructions to set up gatsby-plugin-ipfs
, and I get the following error in my console after viewing the website on localhost:
Uncaught (in promise) SyntaxError: Unexpected token _ in JSON at position 1132
at JSON.parse (<anonymous>)
at Object.YZX3 (commons-56a4a8d1b87de487b0b8.js:1)
at u (bootstrap:102)
at Object.6Gk8 (bio.js:15)
at u (bootstrap:102)
at Module.RXBc (index.js:1)
at u (bootstrap:102)
I've made zero changes to the starter so I'm wondering what's going on. The starter by itself without the plugin does not have this issue.
There are breaking API changes in Gatsby v2 which prevent this plugin from working.
I'm trying to generate sitemaps using the plugin gatsby-plugin-sitemap, but the generated URLs are like this: https://website.com./page/
Note the trailing dot after the domain. The gatsby-plugin-sitemap is before the gatsby-plugin-ipfs in gatsby-config.js just for information.
Not sure if there is something that can be done from gatsby-plugin-ipfs side.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.