Skip to content
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

Error when using nuxt-i18n dep in Nuxt #66

Open
girardinsamuel opened this issue Sep 7, 2020 · 1 comment
Open

Error when using nuxt-i18n dep in Nuxt #66

girardinsamuel opened this issue Sep 7, 2020 · 1 comment

Comments

@girardinsamuel
Copy link

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 👍 !

@girardinsamuel
Copy link
Author

I have found out that it was working on Node 12.16 but not on the latest LTS Node version 12.18.3.
I can create a repository to reproduce the issue if you want.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant