Billal BEGUERADJ
Billal BEGUERADJ

Reputation: 22754

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

I created a fresh Nuxt.js project: npx create-nuxt-app project

Then I launch the server: cd project && npm run dev Till this point is all ok.

Now I want to install nuxt-i18n: npm i nuxt-i18n and then I added it in nuxt.config.js:

modules: [
    ['nuxt-i18n', {
      // Options
    }]

I am getting the following error in the console of the development tools (with a page showing blank):

app.js:455 [nuxt] Error while initializing app TypeError: parentVal.concat is not a function
    at mergeHook (commons.app.js:11924)
    at mergeField (commons.app.js:12185)
    at mergeOptions (commons.app.js:12176)
    at Vue._init (commons.app.js:15301)
    at new Vue (commons.app.js:15419)
    at _callee5$ (app.js:1317)
    at tryCatch (commons.app.js:5854)
    at Generator.invoke [as _invoke] (commons.app.js:6088)
    at Generator.prototype.(:3000/anonymous function) [as next] (http://localhost:3000/_nuxt/commons.app.js:5906:21)
    at asyncGeneratorStep (commons.app.js:33)

What causes this and how to fix it?

Upvotes: 0

Views: 379

Answers (2)

Aldarund
Aldarund

Reputation: 17621

It was due to vue-meta. Vue-meta 1.5.5 was released that is fixed this issue. So you can update it and it will fine

Upvotes: 0

Nicolas Pennec
Nicolas Pennec

Reputation: 7631

It seems due to a sub dependency issue from vue-meta used by vue-i18n (see the open issue https://github.com/nuxt-community/nuxt-i18n/issues/127)

as workaround, try to set the seo option at false :

// nuxt.config.js

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

Upvotes: 1

Related Questions