-
Notifications
You must be signed in to change notification settings - Fork 298
Example: Upload file to IPFS via browser w/ React & Webpack #539
Conversation
617457c
to
88363de
Compare
Weird... this was working last night, but now fails in the browser with this error: Got nowhere googling it... any ideas? @dignifiedquire perhaps? |
@harlantwood, just to remove weird chances, mind trying a fresh npm install and run through it again? |
I did try that, but thanks! Any other ideas welcome. Strange.
|
88363de
to
2a78adc
Compare
Weird, fixed the issues above... by removing the eslint dependencies. No idea why. But works. Someone give it a try to confirm it works on 2 machines. 😉 Other than that, ready for merging AFAICT. |
Note: this was originally forked from @victorbjelkholm's |
97f6ed2
to
8339d38
Compare
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.
Looks like an awesome example, thank you @harlantwood
Seems CI fails just because of linting, mind running a npm run lint
and checking what is wrong?
Thank you :)
} | ||
} | ||
|
||
module.exports = config |
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.
Do we need this file?
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.
well, we need a bit of lint config so that aegir doesn't get upset about react/jsx stuff. I simplified by replacing this one with the .eslintrc from examples/bundle-webpack
.
@@ -0,0 +1,3 @@ | |||
{ | |||
"stage": 0 | |||
} |
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.
Do we need this?
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.
seems like not. I cut it out and it all seems to hang together ok. 😜
8339d38
to
825add9
Compare
Thanks @diasdavid. I fixed the lint issues. FWIW, I looked at travis and saw that the build hadn't passed in a month, so I ignored the failing builds there without investigating, especially because Circle CI was passing. Not sure what the deal is there. Maybe we should lint on Circle as well? Also @dignifiedquire aegir-lint was failing because I was trying to use the futuristic not yet allowed at all http://babeljs.io/docs/plugins/transform-class-properties/ -- it got a "parse error". The thing I wanted to bring to your attention is that aegir-lint gave no information on CI, just "exit code 1" ( https://travis-ci.org/ipfs/js-ipfs-api/jobs/213967377 ) although it gave a clear error message when I ran |
Thanks @harlantwood there are some issues with output in awgir currently which will hopefully be fixed soonish. Not sure why we don't run linting circle we should fix that. |
I believe that isn't quite right, as the only run that 'typically' fails is the Node.js 6 because we run the SauceLabs tests there, which has a super short pool of workers and returns failure if there aren't any available. We need to use better those small resources available.
We are currently looking for help into refactoring aegir -- ipfs/aegir#113 -- These kind of problems are causing a lot of trouble, if you or if you know anyone that would like to help, please ping us :). Thank you! |
Great, glad to get this example in! 😁 |
TL;DR: A new example, showing uploading a binary file to IPFS via the browser using js-ipfs-api, via a simple React app, bundled with Webpack.
Issues have been fixed, ready to merge. Works in (my) Chrome and Firefox on Mac.
From the readme of this example:
For more background see #316.
@diasdavid @dignifiedquire @lidel