Can't find output directory from root

OK I've found my way a far bit further down the path - and am tantalizingly close. First - my custom build script for (dotnet) Fable is this
#!/bin/bash

curl -sSL https://dot.net/v1/dotnet-install.sh > dotnet-install.sh;
chmod +x dotnet-install.sh;
./dotnet-install.sh -c 8.0 -InstallDir ~/dotnet8;
export PATH=$PATH:~/dotnet8;
dotnet tool restore;
npm run build;
#!/bin/bash

curl -sSL https://dot.net/v1/dotnet-install.sh > dotnet-install.sh;
chmod +x dotnet-install.sh;
./dotnet-install.sh -c 8.0 -InstallDir ~/dotnet8;
export PATH=$PATH:~/dotnet8;
dotnet tool restore;
npm run build;
which I run inline as a single custom command. (see screen grab) This works so well I can even see the actual named path for output in the logs
07:00:31.983 Fable compilation finished in 18359ms
07:00:31.984
07:00:31.993 .> node_modules/.bin/vite build
07:00:32.214 vite v5.4.6 building for production...
07:00:32.216
07:00:32.217 (!) outDir /opt/buildhome/repo/publish/app/public is not inside project root and will not be emptied.
07:00:32.217 Use --emptyOutDir to override.
07:00:32.217
07:00:31.983 Fable compilation finished in 18359ms
07:00:31.984
07:00:31.993 .> node_modules/.bin/vite build
07:00:32.214 vite v5.4.6 building for production...
07:00:32.216
07:00:32.217 (!) outDir /opt/buildhome/repo/publish/app/public is not inside project root and will not be emptied.
07:00:32.217 Use --emptyOutDir to override.
07:00:32.217
But when it gets to the moment of truth the output path can't be found.
06:56:52.756 Note: No functions dir at /functions found. Skipping.
06:56:52.756 Validating asset output directory
06:56:52.757 Error: Output directory "opt/buildhome/repo/publish/app/public" not found.
06:56:53.710 Failed: build output directory not found
06:56:52.756 Note: No functions dir at /functions found. Skipping.
06:56:52.756 Validating asset output directory
06:56:52.757 Error: Output directory "opt/buildhome/repo/publish/app/public" not found.
06:56:53.710 Failed: build output directory not found
The only thing I noticed is that the Error seems to have dropped the leading "/" so I'm curious if that might be the issue.
No description
2 Replies
Houston
HoustonOP3mo ago
I also tried removing the outDir setting in Vite and just use "dist" and that isn't found either.
Houston
HoustonOP3mo ago
SOLVED - finally got the "right" settings and found a note in another thread here that Cloudflare Pages "manual" redeployment doesn't always pick up the latest settings as expected. So once I got the settings right and tiggered the build from automation it all sorted out.
No description
No description
No description
No description
Want results from more Discord servers?
Add your server