TypeError: render2 is not a function
See original GitHub issueNot sure if this is a bug This is the only difference Production: node version 14.17.0 Dev: node version 14.16.0
When I run npm run build on dev it works but not on a production self hosted server this is what I get
✓ 76 modules transformed.
.svelte-kit/output/server/app.js 501.50kb
Run npm run preview to preview your production build locally.
> Using @sveltejs/adapter-node
TypeError: render2 is not a function
at Object.handle (file:///home/admin/web/mylastore.com/public_html/.svelte-kit/output/server/app.js:80:26)
at respond (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/ssr.js:1514:30)
at Module.render (file:///home/admin/web/mylastore.com/public_html/.svelte-kit/output/server/app.js:319:10)
at visit (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:131:30)
at prerender (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:245:11)
at async Object.prerender (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:312:5)
at async adapt (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/adapter-node/index.js:28:4)
at async adapt (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:338:2)
at async file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/cli.js:654:5
> 500 /
Error: 500 /
at error (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:94:11)
at visit (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:176:5)
at async prerender (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:245:5)
at async Object.prerender (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:312:5)
at async adapt (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/adapter-node/index.js:28:4)
at async adapt (file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/chunks/index7.js:338:2)
at async file:///home/admin/web/mylastore.com/public_html/node_modules/@sveltejs/kit/dist/cli.js:654:5
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (9 by maintainers)
Top Results From Across the Web
React Context: TypeError: render is not a function
The problem is I seem to be getting an error 'TypeError: render is not a function. (In render(newValue), render is an instance of...
Read more >10193 (TypeError: a.render is not a function) - CKEditor
I just downloaded CKeditor 4.1RC (full package) and get the following error when I try to assign items the custom default toolbar :...
Read more >render is not a function????? (Example) - Treehouse
render is not a function ????? I am try Use Context API but having this Strange error. Context/index.js. const AmazonContext = React.
Read more >Children of Consumer without new line gives "TypeError ...
I get a confusing error when not using a new line in the children of a ... new line gives "TypeError: render is...
Read more >Javascript – React Context: TypeError: render is not a function
The problem is I seem to be getting an error 'TypeError: render is not a function. (In render(newValue), render is an instance of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you are running into this (as I just did when updating), you need to rename “render” to “resolve” for the function argument in the
hooks.js
file. This file is included as part of the template, but it’s optional, and it’s likely you can just remove the file without an issue.ok, updated to latest svelte and something else broke, but manage to correct that also and now the site is working on production server.
under svelte hooks they rename the method “render” to “resolve” export async function handle({ request, render }) { to export async function handle({ request, resolve }) {