Replies: 2 comments
-
The temporary hack I am using to workaround at the moment is to create symbolic links ( The main difference between the "working" Nuxt example and what I am doing is that in my case there is server-side request handling code (and API endpoint, compiled by Nuxt + Vite) trying to call BAML, rather than code used to generated the static HTML portion of the page, which is what the example does. |
Beta Was this translation helpful? Give feedback.
-
Hi - sorry for the slow response. I'm glad that baml-examples helped! I would suggest reading the tsconfig.json files in that example as well as the nuxt config - the baml library only works on the server side, not the frontend, and I suspect what you're doing is trying to put code on the frontend or messing with the vite packaging somehow. I'd also recommend asking on https://boundaryml.com/discord and searching there: we're a lot more active there. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I started with Nuxt sample project (baml-examples/nuxt-starter), but wanted to modify it so that the client sends some text which is then analyzed via a call to BAML. The setup where the client calls a function and gets back a result works when the function just returns some mock, hard-coded data. But as soon as I do:
The page doesn't load and I get the following error in the browser:
I added `module_format "esm" in my BAML generator config. Here is the complete file:
I also tried some ideas from ChatGTP like declaring aliases in nuxt.config.js like this:
But that didn't work either.
Can anyone help? It seems related to BAML and I saw some other issues reported here around "safe_imports"
Beta Was this translation helpful? Give feedback.
All reactions