Skip to content
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

Babel should not run in published code #61

Closed
vasco-santos opened this issue Jun 9, 2020 · 7 comments · Fixed by #63
Closed

Babel should not run in published code #61

vasco-santos opened this issue Jun 9, 2020 · 7 comments · Fixed by #63

Comments

@vasco-santos
Copy link
Collaborator

I was integrating libp2p-noise in js-ipfs and I got some issues with the integration.
It seems that libp2p-noise code is being transpiled and it should not.

Context: ipfs/js-ipfs#3074

@mpetrunic
Copy link
Member

ipfs/js-ipfs#3074 (comment)
I will open PR to fix babel not to use global regeneratorRuntime and try it out in js-ipfs

@olivier-nerot
Copy link

I confirm. It breaks electron builds with the following error

Uncaught ReferenceError: regeneratorRuntime is not defined
    at handshake-xx.js:59
    at handshake-xx.js:58
    at Object.ca6b (handshake-xx.js:18)
    at c (bootstrap:89)
    at Module.56d7 (app.c5eca448.js:1)
    at c (bootstrap:89)
    at Object.0 (app.c5eca448.js:1)
    at c (bootstrap:89)
    at a (bootstrap:45)
    at bootstrap:267

(this comment to know when the issue is solved, and if it may help others faced with the same electron builds problem)

@mpetrunic
Copy link
Member

@vasco-santos Can you try building and linking this: #62
I've tried and all examples in ipfs works.

@vasco-santos
Copy link
Collaborator Author

@mpetrunic did you try this removing the "@babel/plugin-transform-runtime" from the examples I have changed in the PR?

@mpetrunic
Copy link
Member

@mpetrunic did you try this removing the "@babel/plugin-transform-runtime" from the examples I have changed in the PR?

Yes, I've reverted back to commit before you added those

@vasco-santos
Copy link
Collaborator Author

I could run it now without issues. Browser caching 😓
Thanks for looking into it

@mpetrunic
Copy link
Member

Cool, I will merge and release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants