When running SSG on a fresh qwik project, I immediately run into errors:
$ npm run build.server
✓ 34 modules transformed.
server/build/q-YWg4fP5u.css 3.68 kB
server/entry.ssr.js 18.62 kB
server/@qwik-city-plan.js 21.16 kB
server/q-SuYaUqWW.js 84.01 kB
✓ built in 6.25s
Starting Qwik City SSG...
Missing client manifest, loading symbols in the client might 404. Please ensure the client build has run and generated the manifest for the server build.
Then three errors occur:
Error during SSG
Oe is not iterable (cannot read property Symbol(Symbol.iterator))
Pathname: /
Plugin: qwik-ssg
File: /workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17552
[...]
13 | This is because the routeLoader$ was not exported in a 'layout.tsx' or 'index.tsx' file of the existing route.
at V$ (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17552)
at AsyncFunction.J$ (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17985)
at AsyncFunction.Mi (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:10:5865)
at AsyncFunction.B (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:10:5799)
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:10530
at R (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:7:1604)
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:10399
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:8:4723
at De (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:7:1524)
at we (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:8:4716)
dist/index.html
Missing client manifest, loading symbols in the client might 404. Please ensure the client build has run and generated the manifest for the server build.
Missing client manifest, loading symbols in the client might 404. Please ensure the client build has run and generated the manifest for the server build.
Error during SSG
Oe is not iterable (cannot read property Symbol(Symbol.iterator))
Pathname: /demo/flower/
Plugin: qwik-ssg
File: /workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17552
[...]
12 | Action.run() can only be called on the browser, for example when a user clicks a button, or submits a form.`)},Al=(t,...e)=>{const{id:n,validators:s}=ir(e,t);function o(){const r=sl(),i=rl(),c={actionPath:`?${X$}=${n}`,isRunning:!1,status:void 0,value:void 0,formData:void 0},$=jt(()=>{const a=i.value;if(a&&(a==null?void 0:a.id)===n){const f=a.data;if(f instanceof FormData&&(c.formData=f),a.output){const{status:p,result:m}=a.output;c.status=p,c.value=m}}return c}),l=lt(ul,"s_A5bZC7WO00A",[i,n,r,$]);return c.submit=l,$}return o.__brand="server_action",o.__validators=s,o.__qrl=t,o.__id=n,Object.freeze(o),o},ql=(t,...e)=>{const{id:n,validators:s}=ir(e,t);function o(){return Jt(jo,r=>{if(!(n in r))throw new Error(`routeLoader$ "${t.getSymbol()}" was invoked in a route where it was not declared.
13 | This is because the routeLoader$ was not exported in a 'layout.tsx' or 'index.tsx' file of the existing route.
at V$ (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17552)
at AsyncFunction.J$ (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17985)
at AsyncFunction.Mi (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:10:5865)
at AsyncFunction.B (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:10:5799)
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:10530
at R (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:7:1604)
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:10399
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:8:4723
at De (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:7:1524)
at we (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:8:4716)
dist/demo/flower/index.html
Error during SSG
Oe is not iterable (cannot read property Symbol(Symbol.iterator))
Pathname: /demo/todolist/
Plugin: qwik-ssg
File: /workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17552
[...]
12 | Action.run() can only be called on the browser, for example when a user clicks a button, or submits a form.`)},Al=(t,...e)=>{const{id:n,validators:s}=ir(e,t);function o(){const r=sl(),i=rl(),c={actionPath:`?${X$}=${n}`,isRunning:!1,status:void 0,value:void 0,formData:void 0},$=jt(()=>{const a=i.value;if(a&&(a==null?void 0:a.id)===n){const f=a.data;if(f instanceof FormData&&(c.formData=f),a.output){const{status:p,result:m}=a.output;c.status=p,c.value=m}}return c}),l=lt(ul,"s_A5bZC7WO00A",[i,n,r,$]);return c.submit=l,$}return o.__brand="server_action",o.__validators=s,o.__qrl=t,o.__id=n,Object.freeze(o),o},ql=(t,...e)=>{const{id:n,validators:s}=ir(e,t);function o(){return Jt(jo,r=>{if(!(n in r))throw new Error(`routeLoader$ "${t.getSymbol()}" was invoked in a route where it was not declared.
13 | This is because the routeLoader$ was not exported in a 'layout.tsx' or 'index.tsx' file of the existing route.
at V$ (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17552)
at AsyncFunction.J$ (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:17985)
at AsyncFunction.Mi (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:10:5865)
at AsyncFunction.B (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:10:5799)
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:10530
at R (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:7:1604)
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:11:10399
at file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:8:4723
at De (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:7:1524)
at we (file:///workspaces/qwik-ssg-test/server/q-SuYaUqWW.js:8:4716)
dist/demo/todolist/index.html
error during build:
undefined
If done the same steps with selecting Empty Project, only the third error will occur.
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
When running SSG on a fresh qwik project, I immediately run into errors:
Then three errors occur:
If done the same steps with selecting
Empty Project
, only the third error will occur.Reproduction
https://github.com/wtho/qwik-ssg-test
Steps to reproduce
System Info