question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Regression] `doNotPrerender` does not allow `false` or `undefined` value

See original GitHub issue

Description

Up to now we have been using a method, that returns a boolean, to determine whether a page should be pre-rendered. This allows to conditionally decide whether a page should be pre-rendered based on environment.

export const doNotPrerender = !canPrerenderType('brandPage');

as of 0.4.12, builds now fail with the below error:

Error: [vite-plugin-ssr@0.4.12][Wrong Usage] /src/pages/UcoBrand/UcoBrand.page.server.ts has `export { doNotPrerender }` with a forbidden value. The value of `doNotPrerender` is only allowed to be `true`.

Error Stack

/Path/to/project/node_modules/@brillout/libassert/dist/cjs/newError.js:10
        err = new Error(errorMessage);
              ^

Error: [vite-plugin-ssr@0.4.12][Wrong Usage] /src/pages/UcoBrand/UcoBrand.page.server.ts has `export { doNotPrerender }` with a forbidden value. The value of `doNotPrerender` is only allowed to be `true`.
    at null.<anonymous> (/Path/to/project/node_modules/vite-plugin-ssr/dist/cjs/shared/getPageFiles/assertExports.js:13:21)
    at Array.forEach (<anonymous>)
    at null.assertExportValues (/Path/to/project/node_modules/vite-plugin-ssr/dist/cjs/shared/getPageFiles/assertExports.js:7:17)
    at Object.pageFile.loadFile (/Path/to/project/node_modules/vite-plugin-ssr/dist/cjs/shared/getPageFiles/parseGlobResults.js:27:37)
    at null.<anonymous> (/Path/to/project/node_modules/vite-plugin-ssr/dist/cjs/node/prerender.js:125:9)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brilloutcommented, Jul 25, 2022

I’ll fix this later today/tomorrow.

1reaction
brilloutcommented, Jul 25, 2022

Makes sense. Let me fix this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression with predictors that are sometimes undefined
I would like to find the dependence of the mean of Y on A, B, C and L, and it is reasonable to...
Read more >
Generate Truth Table but leave some variables undefined in ...
Assuming that Undefined can be None, for example, you could do as follows: l = [True, False, None, True, None] # first get...
Read more >
importing undefined environment variable results in empty string
As it currently stands, an empty string is returned regardless whether the environment variable does not exist or it does exist with an...
Read more >
Diff - e58c253a5a..9c0fc3b7d7 - chromium/src - Git at Google
This does not include # test code (test support and anything in the test ... + bool done_ = false; + + DISALLOW_COPY_AND_ASSIGN(TestThread);...
Read more >
OMP_NESTED - GNU libgomp
The value of this environment variable shall be TRUE or FALSE . If undefined, nested parallel regions are disabled by default. See also:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found