isolated_vm module not found after running bun dev
Hi folks, I'm trying to create a custom block following the Forge documentation. Both
bun install
and bun dev
apparently executes ok but when I try to access the builder at http://localhost:3000 an error is raised complaining the isolated_vm
module is not found. I'm using bun 1.2.15 and node v22.16.0and everything is running inside a devcontainer to ensure a pristine development environment (I also tried the same steps without the devcontainer with the same results). Any ideas about what I'm missing or doing it wrong?3 Replies
I think I figured out the error. The webpack configuration for the builder is not excluding the isolated_vm from the frontend build. We need to insert config.externals.push("isolated-vm") before returning the webpack configuration, at line 64 of file apps/builder/next.config.mjs
Please let me known if I should report this on github issues?
I'm also getting the same error, and I tried your fix. But unfortunately it didnt help.
I'm using
bun 1.2.19
Setting node version to 20, deleting the folder node_modules and re-installing the libraries solved for me
nvm use 20