How does Fresh run esbuild on Deploy without cache writes?
I'm trying to build some solidjs code during runtime, but I keep getting errors on Deploy because of writes to esbuild cache:
My config looks pretty similar I think?
fresh esbuild config: https://github.com/denoland/fresh/blob/2fc212cc045e4f71a787a5bc9ebdee1ef5770bf9/src/build/esbuild.ts#L96
edit: oh is it writes from installing via npm?? Maybe portable isn't as portable as I thought.
GitHub
fresh/src/build/esbuild.ts at 2fc212cc045e4f71a787a5bc9ebdee1ef5770...
The next-gen web framework. Contribute to denoland/fresh development by creating an account on GitHub.
3 Replies
Based on the documentation, Deno Deploy's file system is read-only, which means it doesn't allow write operations. This is why you're seeing a
PermissionDenied
error when trying to write to the esbuild cache.
The portable
option in the denoPlugins
function is likely meant to make the esbuild binary portable across different environments, but it doesn't change the fact that Deno Deploy's file system is read-only.
The error you're seeing seems to be coming from the installFromNPM
function, which is trying to create a directory in the esbuild cache. This operation is not allowed in Deno Deploy due to its read-only file system.
Unfortunately, the documentation does not provide a clear solution for this issue. It might be worth reaching out to the Deno community or the maintainers of the esbuild and deno plugins for further assistance.We use the wasm build of
esbuild
on deploy. That's the main differenceAhh got it. I just added a build step to deploys for now, but maybe I'll play with that later.
Thanks!