@nathanmartin Nathan, thanks for your help so far. How can I ensure that the netlify.toml file is being detected? Should I look for it in the Deploy File Browser?
I have confirmed the fileâs location is in the root folder, Iâve even added some dependency that checks if the file is there during the build.
Here is what I get from the deploy log:
12:44:45 PM: Unpacking archive
12:44:46 PM: Starting post processing
12:44:46 PM: Post processing - Forms
12:44:46 PM: Post processing - header rules
12:44:46 PM: Post processing - redirect rules
12:44:46 PM: Post processing done
12:44:46 PM: Section completed: postprocessing
12:44:49 PM: Site is live â¨
I have also added another /test redirect, which doesnât work.
# Redirects
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
force = true
headers = { Cache-Control = "no-cache" }
[[redirects]]
from = "/test"
to = "/"
status = 200
When you say âroot folderâ do you mean âroot of the repositoryâ? or âroot of the publish directoryâ?
At this stage my guess is it may still be in the wrong spot.
A quick and simple test would be to change the build command in the netlify.toml to something nonsensical e.g. npm run nothing
If it runs that command (and obviously fails), you would know it saw the netlify.toml.
If it still runs npm run build then you know itâs not seeing the netlify.toml and likely getting the command from the Netlify UI Build Configuration.
You tell me, is there another more extensive build log in Netlify?
I mean âroot of the repositoryâ and not âroot of the publish directoryâ.
From what I understand, the root of the publish directory must be the /dist folder in a standard Bolt.new web app.
When changed the build command to ânpm run nothingâ, it still runs ânpm run buildâ. Where exactly is the Netlify UI Build configuration, is it a default settings? Here are all the settings I see:
The only place where I see configurable build settings are when I try to connect a repository for continuous deployment via Git, Bitbucket, etc. Is this something that you recommend in this case?
Why wouldnât I get it to work, if there is a way, and what is the difference between the two? Iâve checked the article in the Netlify docs file, but it doesnât explain the difference between the two approaches, itâs a technical article. So how can I make an informed decision about it? Please help.
Iâll preface all this with, I donât work for Netlify, I do not have any special access.
You tell me, you can see it within your account, I cannot.
This seems correct, I only asked becauseâŚ
The âroot of the repositoryâ (specifically the Base directory) is correct for a netlify.toml
The âroot of the publish directoryâ is correct for a _redirects file
You may have a value set there, which is used when no netlify.toml is detected.
(Although if you created the site with Bolt, Iâm unfamiliar with how it sets those values.)
I donât work with AI, as such Iâm a poor choice to provide recommendations for your workflow.
I canât really say, but you may simply find it âtoo difficultâ as youâre using AI and thus may not have a technical background. You may find it easier to use one approach over the other.
Yes, many things to do with development are âtechnicalâ.
To make an informed decision you can do research and âskill upâ.
If you arenât interested in doing that, you could ask another LLM for its opinion.
@nathanmartin Nathan, I finally managed to fix this using a _redirects in the public folder.
_redirects file content: /* /index.html 200
I am still confused why it didnât work with the netlify.toml. What I noticed is that during the build, Netlify constantly skipped the âBuildâ step even after editing the netlify.toml file and there was no way to reset this process or refresh cache through the Netlify UI.
What I noticed is that during the build, Netlify constantly skipped the âBuildâ step
Youâve hit the nail on the head here - Bolt.new are currently creating deploys by uploading the already-built files, rather than using Netlifyâs build API. This is similar to how drag & drop deploys are made in the Netlify UI.
This may be something that changes in future, and Iâm sure the Bolt team would welcome your feedback on it!