https://codesandbox.io/s/codesandbox-nuxt-hvv2n
Create a default nuxt project and create a broken component - for example importing non-existing component (or download linked CodeSandbox project)
Run to check for expected behaviour
yarn install && yarn build && echo "should not see this"
You will get nuxt fatal error and "should not see this" will not be printed.
You can run same project in Teamcity to see build would succeed and no logs printed, but easier is to simulate this by setting env variable, e.g.
export BUILD_NUMBER=123
Clean up the directory and run the same command as 2. Rather than seeing build errors and skipped last command, the build will return 0 and will not print that it failed.
build quietly fails and returns 0 ("should not see this" is printed)
As a current workaround, setting quiet:false in build section in nuxt.config.js enforces the behaviour in Teamcity to be same as usual, i.e. reports issues correctly in logs and with error code.
Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:
Issues that are labeled as pending will not be automatically marked as stale.
This issue still occurs. To reiterate reproduce steps:
export BUILD_NUMBER=123
yarn install && yarn build && echo "should not see this"
Build status returns 0 and no errors are reported, instead of failing as supposed to.
This should not be a stale issue. More time was spent on this than should have been necessary to figure out quiet: false would actually return the error.
Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:
Issues that are labeled as pending will not be automatically marked as stale.
BUMP. Reproduction is above. This is not a stale issue. The same issue still exists, nothing has changed. There needs to be one (or more) of the following in place:
0 which DOES NOT FAIL. Either one is sufficient.
This is still the same issue in edge.
Could someone from Nuxt team comment on this at least?
As far as I can see this is still present, meaning any Nuxt builds in CI environments are potentially unsafe. The fact that build does not report failure means that where there is automated deployment (commit -> CI build & test -> deploy), a broken app can be deployed as CI has no way of seeing that there was a breaking change. In fact this is exactly what happened to us.
There is a workaround, but it's not enabled by default. This issue needs to be fixed (IMO quiet should only impact verbosity of the logging, not build status reporting), or if that's too difficult/too low priority, at least the default could be changed so that CI works with default settings.
Thanks for reporting! #6075 should've fixed that.
Ahhh, good news :) Thanks, didn't notice the other issue.
NP and sorry for the delay :+1:
Closing here as it'll be fixed in the upcoming v2.9 (should be already present in nuxt-edge)