Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt renderer says - renderToString is not a function #45

Closed
thetutlage opened this issue Dec 8, 2016 · 3 comments
Closed

Nuxt renderer says - renderToString is not a function #45

thetutlage opened this issue Dec 8, 2016 · 3 comments

Comments

@thetutlage
Copy link

thetutlage commented Dec 8, 2016

I have trying to make use of the method called nuxt.renderRoute which indeed calls renderToString which throws an error saying TypeError: self.renderToString is not a function.

All I have able to debug is

1.renderToString is a function on vue-server-renderer https://github.com/vuejs/vue/tree/dev/packages/vue-server-renderer

  1. When calling this method, you pass it the context of Nuxt class and Nuxt class does not have renderToString method.

May be I am missing something?

This question is available on Nuxt.js community (#c37)
@Atinux
Copy link
Member

Atinux commented Dec 8, 2016

Hi @thetutlage

Can you update nuxt to use the version 0.8.2 and make sure to use it like this:

const Nuxt = require('nuxt')
const nuxt = new Nuxt()
nuxt.build()
.then(() => {
  // here you can use nuxt.renderRoute() or nuxt.render(req, res)
})

You can see an example here: https://gomix.com/#!/project/nuxt-body-params

Can you give us an snippet of your code?

@Atinux Atinux added the question label Dec 8, 2016
@thetutlage
Copy link
Author

Closing, since it seems to be working fine 😄

@lock
Copy link

lock bot commented Nov 5, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 5, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants