-
Notifications
You must be signed in to change notification settings - Fork 914
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
"_ssrNode" is not defined on the instance but referenced during render #885
Comments
I'm seeing this same thing from avoriaz unit tests trying to update to vue 2.4.1 also seeing it with vue-loader 13.0.2. Not seeing it when actually loading in dev mode though. |
Ah I found the solution. In testing I have a target of |
How are u changing the target? Thanks |
@peteringram0 it's part of webpack's config |
I've met the same problem in the server side after I update to vue 2.4.1 but it'll impact the performance if I turn |
Turning target to web or false doesn't solve the issue for me. |
@peteringram0 can you post your webpack config? The |
Same problem after updating to vue@2.4.1. |
Can anyone provide a runnable reproduction in a repository? The error message alone is not of much help to resolve this. |
Updating to vue-loader@13.0.2 solves my problem. |
@zhanziyang I used the dev branch of NUXT, which installs vue-loader@13.0.2 still shows the error, however, only on the front-end this time (instead of the backend): |
I reaffirm my request:
|
@LinusBorg This is the NUXT server consuming the component built with This is the test component built with Note that the latest release of NUXT (v1.0.0-alpha.4) doesn't use the latest version of Vue-loader, but their |
@LinusBorg Any insights? |
Not yet, sorry. I was away with friends over the weekend and didn't get to this. |
@hirokiosame So I tooka quick not at what you have setup, but didn#t run it yet. The issue I see right now is that you compiled the seperate component with So:
|
Back to square one: Reproduction is required. |
Just set vue-loader's `optimizeSSR` to false. Ref: vuejs/vue-loader#885
I had to remove "target" property from webpack config file in order to make it work. |
Fix "_ssrNode is not a function" error on "node" target. Ref: vuejs/vue-loader#885
I had same problem with my Nuxt project, so I did (stole it from LinusBorg commit): build: {
extend (config, ctx) {
config.module.rules.forEach((rule) => {
if (rule.test.toString() === '/\\.vue$/') {
rule.options.optimizeSSR = false
}
})
}
} in nuxt.config.js |
Adding plugins: [
|
For anyone who stumbles into this again:
The solution is
|
hi @yyx990803 I'm having the same issue and I'm a bit newbie with nuxt, can you explain me what I need add to my nuxt.config.js??? build: {
//vendor: ['axios'],
/*
** You can extend webpack config here
*/
extend(config, ctx) {
// Run ESLint on save
if (ctx.isDev && ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
if (ctx.isServer) {
config.externals = [
nodeExternals({
whitelist: [/^vuetify/]
})
]
}
}
} thank you... |
This isssue is
Please use forum.vuejs.org |
Still getting SSR errors with 12.2.2
Version
12.2.2
Steps to reproduce
[Vue warn]: Property or method "_ssrNode" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
(found in )
[Vue warn]: Property or method "_ssrNode" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
(found in )
[Vue warn]: Property or method "_ssrClass" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
(found in )
[Vue warn]: Error in render function: "TypeError: _vm._ssrClass is not a function"
(found in )
TypeError: _vm._ssrClass is not a function
The text was updated successfully, but these errors were encountered: