You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError: out.global.___viteRenderAssets is not a function
at _marko_template._._marko_renderer.t (app-layout.marko:19)
at renderer (renderer.js:218)
at proxyRenderer (hot-reload.js:73)
at AppLayout.___rerender (Component.js:552)
at hydrateComponentAndGetMount (index-browser.js:427)
at tryHydrateComponent (index-browser.js:387)
at index-browser.js:365
at Array.map (<anonymous>)
at Object.initServerRendered [as concat] (index-browser.js:361)
at index-browser.js:293
app-layout.marko:19 is only a <head> tag
It's ok if I remove the js from the app-layout.marko. Also, If I don't provide data from res.marko() is ok.
Just for info, By searching in the final js I found t.global.___viteRenderAssets(t, "head-prepend").
Expected Behavior
Run without Uncaught TypeError: out.global.___viteRenderAssets is not a function error, because this error breaks the execution of the JS, it is currently unusable.
Actual Behavior
Built on the server side but does not execute in the browser because of this error
Possible Fix
Serialization may be the cause? (res.marko() and res.locals seems to be impacted)
Your Environment
Ubuntu 18.04
Node v14.15.4
I have updated the dependencies of the skeleton (but the bug is perhaps present on the original skeleton):
And replace _./pages/index/index.js` content by this:
importtemplatefrom"./template.marko";exportdefault(req,res)=>{res.marko(template,{pageTitle: 'Welcome to my page',});};
Then run:
npm run dev
or:
npm run build && npm run start
Stack Trace
Uncaught TypeError: out.global.___viteRenderAssets is not a function
at _marko_template._._marko_renderer.t (app-layout.marko:19)
at renderer (renderer.js:218)
at proxyRenderer (hot-reload.js:73)
at AppLayout.___rerender (Component.js:552)
at hydrateComponentAndGetMount (index-browser.js:427)
at tryHydrateComponent (index-browser.js:387)
at index-browser.js:365
at Array.map (<anonymous>)
at Object.initServerRendered [as concat] (index-browser.js:361)
at index-browser.js:293
The text was updated successfully, but these errors were encountered:
I think it's not just adding arguments to res.marko() because when I remove them, I still have the bug. Even if I remove node_modules, package-lock.json and re-install all. Is there a cache somewhere else?
Version: 1.3.2 & 2.0.0
I have tested with 1.3.2 and 2.0.0.
Details
app-layout.marko:19
is only a<head>
tagIt's ok if I remove the js from the app-layout.marko. Also, If I don't provide data from
res.marko()
is ok.Just for info, By searching in the final js I found
t.global.___viteRenderAssets(t, "head-prepend")
.Expected Behavior
Run without
Uncaught TypeError: out.global.___viteRenderAssets is not a function
error, because this error breaks the execution of the JS, it is currently unusable.Actual Behavior
Built on the server side but does not execute in the browser because of this error
Possible Fix
Serialization may be the cause? (
res.marko()
and res.locals seems to be impacted)Your Environment
Ubuntu 18.04
Node v14.15.4
I have updated the dependencies of the skeleton (but the bug is perhaps present on the original skeleton):
Steps to Reproduce
Generate a vite express project with:
Replace
app-layout/app-layout.marko
content by this:And replace _./pages/index/index.js` content by this:
Then run:
or:
npm run build && npm run start
Stack Trace
The text was updated successfully, but these errors were encountered: