You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.
I have a project that compiles into the target directory, a sub-directory of my repo. My site is configured to use target as the 'deploy' directory (aka the 'publish' directory, I think.) This was working until recently.
Recent changes to this netlify/build-image mean that it assumes every project is a rust project, regardless of whether the project uses rust, and that therefore target is cache-able. You can see this by git blameing the following line:
Because of this, the /opt/buildhome/repo/target directory doesn't exist when the deploy starts, and the build fails with the log message "Failed during stage 'building site': Deploy directory 'target' does not exist".
I can think of a few fixes:
The build functions could check whether the project uses rust before trying to cache the target directory.
The build could run the deploy before starting the caching.
The caching code could cp the cacheable directories, instead of mving them.
The Support Guide could document forbidden deploy directories.
In the meantime, I'll try to compile to a different directory.
I was able to debug this using the docker image. My prior attempts to fix the problem are documented in this support ticket.
The text was updated successfully, but these errors were encountered:
I have a project that compiles into the
target
directory, a sub-directory of my repo. My site is configured to usetarget
as the 'deploy' directory (aka the 'publish' directory, I think.) This was working until recently.Recent changes to this
netlify/build-image
mean that it assumes every project is a rust project, regardless of whether the project uses rust, and that thereforetarget
is cache-able. You can see this bygit blame
ing the following line:build-image/run-build-functions.sh
Line 678 in 53b83b6
After my build finishes (successfully), the caching code
mv
s thetarget
directory. See this line:build-image/run-build-functions.sh
Line 746 in 53b83b6
Because of this, the
/opt/buildhome/repo/target
directory doesn't exist when the deploy starts, and the build fails with the log message "Failed during stage 'building site': Deploy directory 'target' does not exist".I can think of a few fixes:
target
directory.cp
the cacheable directories, instead ofmv
ing them.In the meantime, I'll try to compile to a different directory.
I was able to debug this using the docker image. My prior attempts to fix the problem are documented in this support ticket.
The text was updated successfully, but these errors were encountered: