question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: _vm._ssrNode is not a function

See original GitHub issue

Environment

Nuxt 2 with @nuxt/bridge.

$ npx nuxi info
Nuxt CLI v3.0.0-rc.8

Reproduction

Unfortunately the package is secret so I can’t create a reproduction.

Describe the bug

After moving from @nuxtjs/composition-api to @nuxt/bridge, I get the error:

[Vue warn]: Error in render: "TypeError: _vm._ssrNode is not a function"

found in

---> <F24Loader>
       <Pages/index.vue> at pages/index.vue
         <Nuxt>
           <.nuxt/layouts/default.vue> at .nuxt/layouts/default.vue
             <Root>
[nuxt] [request error] _vm._ssrNode is not a function
(...)

<F24Loader /> is a component from the company’s npm package (written with rollup, in Vue 2) in which we keep components common to all projects. It helps to set ssr: false in nuxt.config.ts file, or wrap a component in <client-only>. Is there a chance that these components will also work on the server side?

Additional context

No response

Logs

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
speery4commented, Oct 21, 2022

I am able to reproduce this by creating a new Nuxt 2 project and then following the Nuxt Bridge upgrade guide. The only package I have added is the nuxt-property-decorator package.

https://v3.nuxtjs.org/bridge/overview/

Here is the runtime error

[Vue warn]: Property or method "_ssrNode" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---> <Test> at pages/Test.vue
       <Nuxt>
         <.nuxt/layouts/default.vue> at .nuxt/layouts/default.vue
           <Root>
[Vue warn]: Error in render: "TypeError: _vm._ssrNode is not a function"

found in

---> <Test> at pages/Test.vue
       <Nuxt>
         <.nuxt/layouts/default.vue> at .nuxt/layouts/default.vue
           <Root>
[nuxt] [request error] _vm._ssrNode is not a function
  at Proxy.render (./.nuxt/dist/server/pages/Test.js:19:25)
  at VueComponent.Vue._render (./node_modules/vue/dist/vue.runtime.common.dev.js:2588:28)
  at resolve (./node_modules/vue-server-renderer/build.dev.js:7211:33)
  at waitForServerPrefetch (./node_modules/vue-server-renderer/build.dev.js:7095:5)
  at renderComponentInner (./node_modules/vue-server-renderer/build.dev.js:7225:5)
  at renderComponent (./node_modules/vue-server-renderer/build.dev.js:7185:9)
  at renderNode (./node_modules/vue-server-renderer/build.dev.js:7102:9)
  at resolve (./node_modules/vue-server-renderer/build.dev.js:7222:9)
  at waitForServerPrefetch (./node_modules/vue-server-renderer/build.dev.js:7095:5)
  at renderComponentInner (./node_modules/vue-server-renderer/build.dev.js:7225:5)

pages/Test.vue

<template>
  <h1>Test Page</h1>
</template>

<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator';

/**
 * Test Page
 */
@Component({
  components: {},
  mixins: []
})
export default class Test extends Vue {}
</script>
1reaction
MartinX3commented, Dec 20, 2022

@Laruxo it’s deprecated by the composition api since vue 2.7.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt _vm._ssrNode is not a function when running yarn dev
When I run Nuxt from the CLI e.g. nuxt which is located at /home/<user>/.nvm/versions/node/v12.16.3/bin/nuxt , the app runs perfectly.
Read more >
t._ssrNode is not a function · Issue #492 · vuejs/vuepress
Upon inspecting the console I find the error: TypeError: e._ssrNode is not a function multiple times. I have verified this on multiple ...
Read more >
TypeError (...) is not a function - Get Help - Vue Forum
Hello there, I have a problem with compiling a vue file. I got 2 errors for probably one underlying problem. The error-messages are...
Read more >
vm.removeProductFromCart is not a function in vue/vuex-Vue.js
Coding example for the question TypeError: _vm.removeProductFromCart is not a function in vue/vuex-Vue.js.
Read more >
Server Side Rendering - Nuxt
export default function (req, res, next) { console.log(req.url) next() } ... You do not have access to the window or document objects as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found