Buffer not found in static build using sveltekit and Torus library
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js
Research direction
Reproduce the failure from the linked torus-bufer repository with npm i, npm run build, and npm run preview. Start by reading svelte.config.js and compare the static preview with npm run dev; done means the browser build runs without the Buffer is not defined error.
Written by the indexing model from the issue text.
Description
I need a way to alias Buffer for the browser.
Not sure which module requires this but its probably crypto related.
500
Buffer is not defined
@http://localhost:3000/_app/pages/index.svelte-2478ade3.js:1:111754
Problem is using Torus node library.
Here is a repo: https://github.com/ralyodio/torus-bufer
npm i
npm run build
npm run preview
...you will see error. npm run dev works fine since node handles requests. Its the browser only environment that is the issue.
The polyfill in svelte.config.js appears to not work: https://github.com/ralyodio/torus-bufer/blob/master/svelte.config.js
- Dominant language
- Go
- Stars
- 233
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetaMask/torus-node
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
MetaMask/torus-node#6 · 2 comments · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 15/100
MetaMask/torus-node#5 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
MetaMask/torus-node#3 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 15/100
MetaMask/torus-node#2 · 4 comments ·
All issues in MetaMask/torus-node
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100