Nuxt.js: Error while initializing app TypeError: parentVal.concat is not a function

Created on 24 Sep 2018  路  15Comments  路  Source: nuxt/nuxt.js

Version

2.0.0

Reproduction link

https://nuxtjs.org

Steps to reproduce

Upgrade a project to Nuxt 2.0.0.

What is expected ?

No error.

What is actually happening?

Hello. I get the following error that is not easy to understand and debug:

[nuxt] Error while initializing app TypeError: parentVal.concat is not a function
    at mergeHook (commons.app.js:10224)
    at mergeField (commons.app.js:10485)
    at mergeOptions (commons.app.js:10476)
    at Function.Vue.extend (commons.app.js:13793)
    at sanitizeComponent (app.js:4688)
    at _callee$ (app.js:4757)
    at tryCatch (commons.app.js:4154)
    at Generator.invoke [as _invoke] (commons.app.js:4388)
    at Generator.prototype.(anonymous function) [as next] (http://localhost:3000/_nuxt/commons.app.js:4206:21)
    at asyncGeneratorStep (commons.app.js:33)

It seems to be part of the Vue.js framework. Any idea what could cause this in my code? A module, a Vue plugin, an external lib?

This bug report is available on Nuxt community (#c7819)
bug-report

Most helpful comment

As far as we know it's a bug in nuxt-i18n after the last vue-meta release (though it could be an issue with vue-meta as well). We are on it 鈽猴笍

Use seo: false in the module options or downgrading vue-meta by one minor version to temporary work around the issue.

All 15 comments

The same is happening to me on 1.4.2 ... This just started happening after I updated my dependencies 30 minutes ago.

As far as we know it's a bug in nuxt-i18n after the last vue-meta release (though it could be an issue with vue-meta as well). We are on it 鈽猴笍

Use seo: false in the module options or downgrading vue-meta by one minor version to temporary work around the issue.

I can confirm that turning seo to false fixes the issue for now.

I tried to downgrade vue-meta to 1.5.3 and other issues started happening.

Wow, thank you for the quick workaround!

Yes - after an upgrade of my test project from 1.0.0 to 2.0.0 (same from 1.0.0 to 1.4.x versions) i also figgered out that nuxt-i18n causes this error. Setting seo to false fixed this error.

Any ideas how to fix it without "seo:false" ?
Otherwise, do we have to manually add the alternate url to every page ?

Best,

@manniL
In my nuxt.config.js file, I tried:

modules: [
    ['nuxt-i18n', {
      seo:false
    }]

But this does not fix the issue, am I doing this the wrong way maybe? Thank you
Billal Begueradj

@begueradj There might be another reason as well. Try downgrading vue-meta to 1.5.3

@manniL Thank you for the quick response.

I am not using vue-meta in my Nuxt.js application. All what I did is installing nuxt-i18n and set it as I showed (according to the official documentation), and then when I type npm run dev I get the same error above.

@begueradj You use vue-meta automatically because it's included in Nuxt. Please try it ;)

Resolved with [email protected]

This bug-report has been fixed by @manniL, @Atinux.

Updating the dependency nuxt from 2.0.0 to 2.2.0 did it.

Shouldn't be related to a nuxt upgrade as nuxt doesn't pin versions. A yarn upgrade or npm update would be sufficient.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimsg picture vadimsg  路  3Comments

uptownhr picture uptownhr  路  3Comments

vadimsg picture vadimsg  路  3Comments

gary149 picture gary149  路  3Comments

bimohxh picture bimohxh  路  3Comments