I need advice to debug deploy Netlify App
Hi @a28,
This is most likely due to the roll out of: New CI=true build configuration, "Treating warnings as errors because process.env.CI = true". Checkout that article for options to fix.
Mike
Hello,
Thanks a lot for your prompt reply. I am a newbie and can’t figure out the change I need to make in the toml file.
I am pasting the toml file below, please suggest how I should change it.
Global settings applied to the whole site.
“base” is directory to change to before starting build, and
“publish” is the directory to publish (relative to root of your repo).
“command” is your build command.
[build]
base = “”
publish = “build”
command = “REACT_APP_STAGE=dev npm run build”
Production context: All deploys to the main
repository branch will inherit these settings.
[context.production]
command = “REACT_APP_STAGE=prod npm run build”
Deploy Preview context: All Deploy Previews
will inherit these settings.
[context.deploy-preview]
command = “REACT_APP_STAGE=dev npm run build”
Branch Deploy context: All deploys that are not in
an active Deploy Preview will inherit these settings.
[context.branch-deploy]
command = “REACT_APP_STAGE=dev npm run build”
Always redirect any request to our index.html
and return the status code 200.
[[redirects]]
from = “/*”
to = “/index.html”
status = 200
Looks like you are already setting an environment variable for your build commands, so you can add it by updating to the following:
command = “REACT_APP_STAGE=dev CI='' npm run build”
Hi,
It worked! Thanks a ton. The support has been awesome.
Thanks,
Avinash