Skip to content
New issue

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

Build succeeds even when pre-generation of some routes fails #81

Open
VasylMarchuk opened this issue Jun 22, 2024 · 0 comments
Open

Build succeeds even when pre-generation of some routes fails #81

VasylMarchuk opened this issue Jun 22, 2024 · 0 comments

Comments

@VasylMarchuk
Copy link

VasylMarchuk commented Jun 22, 2024

Hi there!

We're using Prember in our project and have an array of routes for pre-rendering returned by a custom urls method in our ember-cli-build.js like so:

/tracks/scala
/languages/rust
/languages/go
...
/collections/rust-primer

The Problem

The problem we're facing is when some of the routes fail to render in FastBoot mode due to errors that manage to slip through our testing pipeline — running ember build --environment=production still succeeds with an exit code of 0, and it even reads Built project successfully. Stored in "dist/". in the output.

This leads to our production deployment script on Vercel to consider the deployment a complete success, and to problems notifications emails to never be sent :(

Is this behavior expected? Or is it supposed to be failing but for some reason doesn't? Do we have to manually grep the output for error-looking messages or would it be possible to maybe add a configuration option like failBuildOnErrors=true?

Thanks!

Log output

[13:41:32.221] Building
[13:41:32.222] Environment: production
[13:41:35.632] building... 
[13:41:35.735] (node:171) [DEP_WEBPACK_JAVASCRIPT_MODULES_PLUGIN] DeprecationWarning: webpack.JavascriptModulesPlugin has moved to webpack.javascript.JavascriptModulesPlugin
[13:41:35.735] (Use `node --trace-deprecation ...` to show where the warning was created)
[13:41:35.735] (node:171) [DEP_WEBPACK_LIBRARY_TEMPLATE_PLUGIN] DeprecationWarning: webpack.LibraryTemplatePlugin is deprecated and has been replaced by compilation.outputOptions.library or compilation.addEntry + passing a library option
[13:41:35.735] (node:171) [DEP_WEBPACK_SINGLE_ENTRY_PLUGIN] DeprecationWarning: SingleEntryPlugin was renamed to EntryPlugin
[13:41:35.735] (node:171) [DEP_WEBPACK_OPTIONS_DEFAULTER] DeprecationWarning: webpack.WebpackOptionsDefaulter is deprecated and has been replaced by webpack.config.getNormalizedWebpackOptions and webpack.config.applyWebpackOptionsDefaults
[13:42:28.031] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules/shiki/dist/langs/emacs-lisp.mjs as it exceeds the max of 500KB.
[13:42:30.582] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules/shiki/dist/langs/emacs-lisp.mjs as it exceeds the max of 500KB.
[13:42:37.855] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules/@shikijs/core/dist/wasm-inlined.mjs as it exceeds the max of 500KB.
[13:42:38.352] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules/@shikijs/core/dist/wasm-inlined.mjs as it exceeds the max of 500KB.
[13:42:44.637] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules/lottie-web/build/player/lottie.js as it exceeds the max of 500KB.
[13:42:46.208] [BABEL] Note: The code generator has deoptimised the styling of /vercel/path0/node_modules/lottie-web/build/player/lottie.js as it exceeds the max of 500KB.
[13:43:48.973] (node:171) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
[13:43:48.974] BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
[13:43:48.974] 	Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
[13:43:48.974] 	Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
[13:45:38.462] pre-render /tracks/scala 200 OK
[13:45:41.379] There was an error running your app in fastboot. More info about the error: 
[13:45:41.379]  TypeError: window.matchMedia is not a function
[13:45:41.380]     at new r (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/assets/webpack:/codecrafters-frontend/services/dark-mode.ts:36:31)
[13:45:41.380]     at Function.create (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at h.create (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at i.lookup (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at u.lookup (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at r.i (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at e.untrack (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at pe.get (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at r [as darkMode] (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at Re (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at e.track (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at d (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at e.track (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at d (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at e.track (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at d (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.380]     at e.track (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at d (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at Object.evaluate (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at Object.evaluate (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at It.evaluateSyscall (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.380]     at It.evaluateInner (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at It.evaluateOuter (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at Wt.next (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at Wt._execute (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at Wt.execute (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at Qt.sync (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at hr.render (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at /tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1
[13:45:41.381]     at Nt (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at gr._renderRoots (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at gr._renderRootsTransaction (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at gr._revalidate (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at invokeWithOnError (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at h.flush (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at p.flush (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at B._end (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at B.end (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.381]     at B._run (/tmp/broccoli-171oPeI37DeUbo1/out-1444-packager_runner_embroider_webpack/rewritten-packages/@embroider/synthesized-vendor/vendor/loader/loader.js:4:1)
[13:45:41.409] pre-render /collections/rust-primer 200 OK
[13:45:41.412] Inserted default meta tags into _empty.html file
[13:45:41.703] cleaning up
[13:45:41.703] cleaning up...
[13:45:42.074] Built project successfully. Stored in "dist/".
[13:45:42.429] File sizes:
[13:45:42.429]  - dist/assets/chunk.004e683aaecc2f7337ad.js: 16.16 kB (3.45 kB gzipped)
[13:45:42.430]  - dist/assets/chunk.0059749682610edeb9a8.js: 5.53 kB (2.42 kB gzipped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant