Additionally, the error is so obscure that it doesn't help at all to understand where and why this error is triggered:
QWIK ERROR Promises not expected here. Error: Promises not expected here.
at createAndLogError (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/core.mjs:53:52)
at throwErrorAndStop (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/core.mjs:28:17)
at drain (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/core.mjs:3202:20)
at Module._walkJSX (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/core.mjs:3226:3)
at SSRContainer.emitUnclaimedProjection (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/server.mjs:8721:35)
at SSRContainer.emitContainerData (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/server.mjs:8414:10)
at SSRContainer.closeElement (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/server.mjs:8239:24)
at drain (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/core.mjs:3207:31)
at resolveValue (/home/ian/Projects/noma/node_modules/.pnpm/@builder.io+qwik@file+..+oss+qwik+packages+qwik_prettier@3.3.3_vite@5.4.9_@types+node@22.7.7__3o4nugbb2q2oqnvka6jhcm2faq/node_modules/@builder.io/qwik/dist/core.mjs:3189:5)
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
Which component is affected?
Qwik Runtime
Describe the bug
Introduced in Qwik V2, the error
Promises not expected here.
is thrown when rendering a component with a conditional projection that is async.For example:
Any other variants of a
<Slot />
being conditionally rendered will give the same error. For example:Additionally, the error is so obscure that it doesn't help at all to understand where and why this error is triggered:
Additional Information
Debugging: