We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, react-static can build an empty or broken public dir and CI will still pass as if it successfully deployed that broken build.
public
The text was updated successfully, but these errors were encountered:
Some quick research. Probably should wrap up more concisely in a PR or issue upstream.
Starting point:
// static.config.js throw new Error("HI");
This produces an error but doesn't exit non-zero. Inspecting things, the init() call (see below) exits successfully without hitting the try/catch.
init()
Then directly in source edit node_modules/react-static/bin/react-static:
node_modules/react-static/bin/react-static
Take this section at the top: https://github.com/react-static/react-static/blob/master/packages/react-static/bin/react-static#L5-L10
try { init() } catch (e) { console.trace(e) process.exit(1) }
cut it out, move it to the bottom of the file like this:
(async () => { try { await init() console.log("TODO RS INIT SUCCESSFUL"); } catch (e) { console.log("TODO RS CAUGHT"); console.trace(e) process.exit(1) } console.log("TODO RS INIT DONE"); })();
And change init's definition to async function init() { /* ... */ }
init
async function init() { /* ... */ }
Now, the debugging statements show that we don't get to TODO RS INIT SUCCESSFUL and do trip TODO RS CAUGHT and we exit non-zero as expected.
TODO RS INIT SUCCESSFUL
TODO RS CAUGHT
Sorry, something went wrong.
It looks like react-static may have fixed this here: react-static/react-static#1451
AFAICT it’s presently only in master https://github.com/react-static/react-static/blob/master/CHANGELOG.md but as soon as that releases we should definitely update!
No branches or pull requests
Currently, react-static can build an empty or broken
public
dir and CI will still pass as if it successfully deployed that broken build.The text was updated successfully, but these errors were encountered: