-
Notifications
You must be signed in to change notification settings - Fork 39
Webpack bundle failing at CID: Unexpected token: name (CID) #38
Comments
Yeah I get something related.
From reading that link it sounds like |
You can either transpile all ES6 things using babel or use uglify-es which is the uglify2 version compatible with es6 syntax. @diasdavid why did you mark this as a bug? |
Picked the wrong issue. Thanks for catching that :) |
I don't get how it is not a bug? Currently, someone who wants to quickly make a React app with an IPFS hello world and publish it on its github pages to share it (someone like me) will likely fail to do so because of this error. 99% of these guys will not transpile the lib but they will say "IPFS? Nah, not stable enough", leave and don't come back until IPFS makes the headlines. I think this kind of issue could discourage a lot of early adopters and should not be considered lightly. My 2 cents 💗 (Additionnal info: this issue tracks the future use of |
Very valuable 2 cents, @acailly. I agree it should be fixed so that devs don't have to work around it. There is also tracking of the same issue here: libp2p/js-libp2p#65. I can add the label bug if that makes a difference, either way, it requires changing how we do the duck typing throughout the codebase. I would be very happy to accept a contribution that removes the need to check constructor name. |
@dignifiedquire I did what you mention about using I had to eject the I did try to use |
It seems @dignifiedquire hit the nail on the head - everything I can find indicates that it's a compatibility issue between ES5 and ES6. @AquiGorka already tried uglify-es, but did anyone try using Babel? That seems like a good option for resolving this. |
I tried Babel too-I mean, I tried almost everything I could think of:
I even wrote a blog post about it all: http://bits.citrusbyte.com/the-state-of-frontend-development-with-IPFS-in-2017/ Catching up to this after a while, found this: @abitrolly if you want a workaround: |
Hi, I'm trying to figure what's the problem here and try to help, I did the first step in this issue:
But it compiled without any problem, have that project been updated to fix that bug? |
Hi all - just as an FYI, there's a bounty of .05ETH on the solve of this issue at: https://gitcoin.co/issue/ipld/js-cid/38 |
Related - ipfs/js-ipfs#938 (comment) |
Hey, feels like managed to solve your issue. I can't submit on gitcoin, cuz its require eth to be in my wallet, so i bought it, but need to wait it to arrive - like a day or smth. |
@dimkk there is no |
@fsdiogo is onto this one and already has a bunch of PRs coming. :) |
@AquiGorka sorry mate, fixed it |
The problem was that the repo ipld/eth-hash-to-cid had an older version of We'll need to update a bunch of deps in Check ipfs/js-ipfs#938 (comment) for reference. |
@fsdiogo It's a lot of work and that would be great! |
Looks like my comment was removed. Let me know when the bug is fixed, and how should I distribute gitcoin bonus for it. Use https://gitcoin.co/faucet if you need some ether to operate with gitcoin.co |
Check ipfs/js-ipfs#1321 for more info. |
@abitrolly Did this one need pay out to @dimkk? @dimkk, if you need ETH, gitcoin.co/faucet should get you there and you can click 'Submit Work' so @abitrolly can pay this out on Gitcoin! |
@rrandom are you still working on this issue?
|
Not sure how it got activated, but can we disable gitcoin somehow? Don't think we're actually using it and it just started appear from nowhere, leaving comments about completely unrelated things |
@victorbjelkholm Ah i guess it came cause @abitrolly put up a bounty on this issue as mentioned here in hopes that someone would pick it up for a reward for 0.05 ETH What happened probably :
Ideally killing the bounty -> would stop the commenting. Agreed springing this up out the blue to the repo owner who isn't aware of gitcoin is confusing ! 😓 |
Issue Status: 1. Open 2. Cancelled Work has been started. has committed to working on this project to be completed 9 months, 4 weeks from now. |
Ok. To stop spamming this issue I killed the bounty here and will award it according to ipfs/js-ipfs#1321 (comment) Thanks everyone for your patience. Thanks to that, we've been able to catch a some issues with |
Issue Status: 1. Open 2. Cancelled The funding of 0.05 ETH (34.19 USD @ $683.88/ETH) attached to this issue has been cancelled by the bounty submitter
|
Hey guys, I'm trying to bundle https://github.com/ipfs/js-ipfs, and they're using cids.
Whenever I try to build,
yarn run build
, with create-react-app, I'm getting this error:looks like uglifyJS doesn't look CID? tracked it down to your package and was wondering if you had any insights.
Unable to build because of this.
The text was updated successfully, but these errors were encountered: