lucacasonato / esbuild_deno_loader

Deno module resolution for `esbuild`
https://deno.land/x/esbuild_deno_loader
MIT License
160 stars 43 forks source link

To use symlink instead of hard link on builds #109

Closed hugo-ccabral closed 7 months ago

hugo-ccabral commented 7 months ago

When building a project with deno run --node-modules-dir=false -A dev.ts build we encountered the following error:

ERROR: [plugin: deno-loader] Invalid cross-device link (os error 18): link '/cache/npm/registry.npmjs.org/minisearch/6.3.0/CHANGELOG.md' -> '/tmp/ee241569/CHANGELOG.md'

We were able to connect this error to the use of hard links instead of symlinks in the build process. Changing this to symlinks resulted in a successful build process.

The error happens when copying the $DENO_DIR to reuse the cache between builds to build the islands ahead-of-time