Skip to content

Error when using nuxt-i18n dep in Nuxt #66

Open
@girardinsamuel

Description

@girardinsamuel

Hi !

I am testing a Nuxt static generated app on Vercel. This app uses nuxt-i18n which is using vue-i18n-extensions

After dependencies installation, when vercel run npm run generate I get the following error :

17:15:43.695 | > [email protected] generate /vercel/61f2f93f
-- | --
17:15:43.695 | > nuxt generate
17:15:44.407 | FATAL  Error parsing /vercel/61f2f93f/node_modules/vue-i18n-extensions/package.json: Unexpected token , in JSON at position 3089
17:15:44.407 | SyntaxError: Error parsing node_modules/vue-i18n-extensions/package.json: Unexpected token , in JSON at position 3089
17:15:44.407 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
17:15:44.418 | ╭──────────────────────────────────────────────────────────────────────────────────────╮
17:15:44.418 | │                                                                                      │
17:15:44.418 | │   ✖ Nuxt Fatal Error                                                                 │
17:15:44.418 | │                                                                                      │
17:15:44.418 | │   SyntaxError: Error parsing                                                         │
17:15:44.418 | │   /vercel/61f2f93f/node_modules/vue-i18n-extensions/package.json: Unexpected token   │
17:15:44.418 | │   , in JSON at position 3089                                                         │
17:15:44.418 | │                                                                                      │
17:15:44.418 | ╰──────────────────────────────────────────────────────────────────────────────────────╯
17:15:44.432 | npm ERR! code ELIFECYCLE
17:15:44.432 | npm ERR! errno 1
17:15:44.433 | npm ERR! [email protected] generate: `nuxt generate`
17:15:44.433 | npm ERR! Exit status 1
17:15:44.433 | npm ERR!
17:15:44.433 | npm ERR! Failed at the [email protected] generate script.
17:15:44.433 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
17:15:44.440 | npm ERR! A complete log of this run can be found in:
17:15:44.440 | npm ERR!     /vercel/.npm/_logs/2020-09-04T15_15_44_434Z-debug.log
17:15:44.445 | Error: Command "npm run generate" exited with 1
17:15:47.471 | Done with "package.json"

Here are an overview of my app dependencies :

"dependencies": {
  3     "@nuxtjs/axios": "^5.12.2",
  4     "@nuxtjs/google-tag-manager": "^2.3.2",
  5     "@nuxtjs/sitemap": "^1.2.0",
 18     "nuxt": "^2.14.4",
 19     "nuxt-i18n": "^4.1.0",
 41   },

It's working in local and in other environments. Do you have some clues about this issue ?
Do you think it's related to Node version ?

Thanks 👍 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions