Issues Copying wasm files for Vercel/prod using create-t3-app
I'm trying to copy/load wasm files from a node package onnxruntime-web/dist using webpack so I can use it to inference a machine learning model I've trained. I t works locally but not on vercel. I haven't done any real web dev prior to 5 days ago.
1. Live App: https://my-t3-app-pi-three.vercel.app/
2. Github: https://github.com/startwarfields/t3rra-viz
The image is what the output is when I click the "Clicked Inference Component" on
My next.config.mjs has a webpack that tries to do this:
the full inference component is below for reference, but the line in question to load the wasm is:
startwarfields test app
Test Bench for Learning web development
GitHub
GitHub - startwarfields/t3rra-viz: let me cook
let me cook. Contribute to startwarfields/t3rra-viz development by creating an account on GitHub.
5 Replies
The production error Im getting is that it's not finding the wasm files
GitHub
Rust WebAssembly module in an ES module wrapper from wasm-pack fail...
What version of Next.js are you using? 11.1.2 What version of Node.js are you using? 14.17.6 What browser are you using? Firefox, Chrome What operating system are you using? macOS How are you deplo...
Im finally able to continue this, ill see if the link is the solution
I figured it out! It was actually a pathing issue
The following code
Put the wasm assets in this directory
I checked Vercel's deployment logs to find the location of the files
https://t3rra-viz-startwarfields.vercel.app/ mission accomplished 😎
startwarfields test app
Test Bench for Learning web development