-
Notifications
You must be signed in to change notification settings - Fork 64
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
Investigate "build issues" #138
Comments
I looked into this while trying to get the Taquito wallet example to run with parcel. I suspect at least the bug with sodium is being caused by a compatibility issue with the typescript compiler with I got a local version of the library to work with parcel/the example by replacing the imports with |
Interestingly, parcel 1 builds it successfully and parcel 2 does not. I think parcel 2 switched from tsc to babel, and there's different default import behavior potentially. |
Hi @AndreasGassmann |
This is still broken when trying to use this library with parcel:
|
@thecatrine how did you manage to get it to build with parcel 1? Which version did you try with, exactly? |
For me parcel 1 was working fine up to beacon-sdk version 6.4.0-ledger.0, but after that the library is unusable with the same reported bug: @mattdesl provides a nice test case for this issue at ecadlabs/taquito#882 |
I am using parcel 1.12.5 and it does not build. |
Is there any updates on this? I am struggling to get the sdk to work with my bundler (vitejs) but still get |
@clemsos Are you able to build with the fork mentioned in the PR above? |
@thecatrine hmmm it didnt work for me - see the #251 (comment) |
@BerkeleyTrue Can you try to install version |
@AndreasGassmann yup, looks like it's fixed |
@AndreasGassmann also fixed for me (vite + vue).
|
Bump! What is the status of this issue? I am using a fresh install of the taquito and beacon-wallet sub packages and I am hitting this issue. If I downgrade to the mentioned version 6 everything works fine, but with any upgrades it busts. This seems like a total deal breaker as I'm using no tools or frameworks. Literally just fresh package installs with a fresh browserify install. Help! Also, all of the documentation links are dead. It feels impossible to get started developing with this lib please help! |
@mikesizz are you on the beta version mentioned above? Can you share a minimal example that breaks? |
Steps to reproduce:
If I switch to the version |
If you don't use a framework or modern build tools, we have a browserified of the beacon-sdk available: https://unpkg.com/@airgap/[email protected]/dist/walletbeacon.min.js Taquito also has a browserified version available, but I'm not sure if it includes the beacon-sdk: https://unpkg.com/@taquito/[email protected]/dist/taquito.min.js I am not familiar with browserify, but in our build pipeline, we have to use the ES5 code for the browserify build. The ES5 code is also shipped as part of the beacon-sdk npm module, it is located in the My assumption is that your project still uses beacon-sdk <
|
Thanks @AndreasGassmann. My apologies about the docs comment! It was late and I got mixed up with which repo I was commenting on (Taquito's docs are broken atm). I really appreciate the CDN links; I'll use those for now. I will probably use the same approach you describe regarding using ES5 code. From my understanding this issue stems from using the newer JS In any event, I hope we can find some resolution on this for the long term. |
I don't use svelte but I've seen others mention this issue with svelte and vite. I'll see if I can find the thread... |
That was fast, haha. Sorry it was vue not svelte, but they do mention vite, so hopefully this may help you. |
@mikesizz Thank you for the comment! It's the same problem as you say. I've tried some adjustment, but it's still not working with sveltekit. I'll continute to try. thank you! |
I have tried with ES5 syntax, and I get the exact same error in the final. (Also using the browserify)
Was anyone here able to solve this issue? |
I was never able to solve it. For now I'm using the CDN version until the project is ready for production. At that point my plan is to investigate using parcel in the ci/cd pipeline to bundle up this particular dep until a solution presents itself. It's beyond suboptimal to have a totally different build tool just for this dependency, but I don't really see a solution for now. 🤷♂️ Edit: |
The hints in that taquito issue got me past the "TypeError: sodium.crypto_generichash is not a function" error. But the need to use different Beacon modules based on the dev vs build environment (for vite) suggests that something is still off with how Beacon-SDK builds and distributes its modules. |
Libsodium has been removed and was replaced by @StableLib a while ago, so those issues should no longer exist. |
Describe the bug (current behavior)
There have been reports that the SDK does not work in some conditions, eg. when webpack is not used.
Expected (correct) behavior
The SDK should work, regardless of the build system.
Screenshots and/or logs
#124
The text was updated successfully, but these errors were encountered: