'Nuxt error : nodeOps.tagName(...) is undefined in Vue framework's 'createPatchFunction'
in my nuxt app , after changing route using this.$router.push({ path: '/path' }) i got the nodeOps.tagName(...) is undefined in firefox , in chrome i get cannot get access to .toLowerCase() of undefined in the same line .
it happens in createPatchFunction of vue.runtime.esm.js versions: nuxt:^2.14.12, vue:^2.6.12
function createPatchFunction (backend) {
// ...
// some more vue framework code here
// ...
function emptyNodeAt (elm) {
// the following line throws error and app crashes
return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
}
}
UPDATE: the elm argument is of type html comment .
UPDATE-2: package.json and nuxt.config.js files:
{
"name": "name",
"version": "1.0.0",
"scripts": {
"build": "nuxt build",
"test": "jest",
"dev": "nuxt",
"generate": "nuxt generate",
"start": "nuxt start"
},
"dependencies": {
"@chenfengyuan/vue-number-input": "^1.2.1",
"@nuxt/content": "^1.5.0",
"@nuxtjs/axios": "^5.12.4",
"@nuxtjs/gtm": "^2.4.0",
"@nuxtjs/proxy": "^2.1.0",
"nuxt": "^2.14.12",
"vue": "^2.6.12",
"vue-multiselect": "^2.1.6",
"vue-numeric-input": "^1.0.6",
"vuex-pathify": "^1.4.4"
},
"devDependencies": {
"@babel/core": "7.12.17",
"@babel/preset-env": "7.12.17",
"@nuxtjs/style-resources": "^1.0.0",
"@nuxtjs/svg": "^0.1.12",
"@nuxtjs/vuetify": "^1.11.2",
"@vue/cli-plugin-unit-jest": "^4.5.13",
"@vue/test-utils": "^1.2.2",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^27.0.6",
"eslint": "^7.25.0",
"eslint-plugin-vue": "^7.9.0",
"jest": "^27.0.6",
"vue-jest": "^3.0.7",
"vue-svg-loader": "^0.16.0",
"vue-template-compiler": "^2.6.12"
}
}
nuxt.config.js
import colors from "vuetify/es5/util/colors";
export default {
mode: "universal",
target: "static",
css: ["@/assets/scss/global.scss"],
plugins: [
"~/plugins/api/index.js",
"~/plugins/sassVaribles/index.js",
"~/plugins/datePicker/index.client.js",
"~/plugins/globalComponents.js",
],
components: false,
buildModules: ["@nuxtjs/vuetify", "@nuxtjs/style-resources"],
modules: [
"@nuxtjs/axios",
"@nuxt/content",
"@nuxtjs/svg",
"@nuxtjs/proxy"
],
styleResources: {
scss: ["@/assets/scss/main.scss"]
},
env: {
},
server: {
port: 8089,
host: "0.0.0.0"
},
axios: {
baseURL: ""
},
vuetify: {
customVariables: ["~/assets/variables.scss"],
rtl: false,
theme: {
dark: false,
default: "light",
disable: false,
options: {
customProperties: true,
variations: true
},
themes: {
light: {
primary: "#5050a0",
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: "#dddcec",
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
},
dark: {
primary: colors.blue.darken2,
accent: colors.grey.darken3,
secondary: colors.amber.darken3,
info: colors.teal.lighten1,
warning: colors.amber.base,
error: colors.deepOrange.accent4,
success: colors.green.accent3
},
custom: {
color: {
background: {
default: "#fff",
paper: "#fff",
paperOverlay: "#fff"
},
text: {
primary: "#000",
secondary: "rgba(0, 0, 0, 0.7)",
disabled: "rgba(0, 0, 0, 0.5)",
hint: "rgba(0, 0, 0, 0.5)",
icon: "rgba(0, 0, 0, 0.5)"
}
}
}
}
}
},
};
Solution 1:[1]
It looks like you have an older version of Node? https://github.com/nuxt/nuxt.js/issues/2385#issuecomment-358111543
Try to upgrade it to the latest LTS aka 14 and double-check that you got the latest version of Nuxt too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | kissu |
