I18n-module: SSR breaks when using v6.13.10 or higher

Created on 8 Sep 2020  路  5Comments  路  Source: nuxt-community/i18n-module

Version

nuxt-i18n: v6.13.12 (v6.13.9 works perfectly, starting from v6.13.10 I have the problem below)
nuxt: v2.14.4

Nuxt configuration

mode:

  • [x] universal
  • [] spa

Nuxt-i18n configuration

https://github.com/miteyema/nuxt-i18n-demo/blob/prod/nuxt.config.js

Reproduction Link

https://github.com/miteyema/nuxt-i18n-demo

Steps to reproduce

Go to https://nuxt-i18n-demo.vercel.app/sitemap.xml

What is Expected?

Should show sitemap

What is actually happening?

502: BAD_GATEWAY

FATAL  Cannot find module 'vue-template-compiler'
Require stack:
- /var/task/node_modules/nuxt-i18n/src/helpers/components.js
- /var/task/node_modules/nuxt-i18n/src/helpers/routes.js
- /var/task/node_modules/nuxt-i18n/src/core/hooks.js
- /var/task/node_modules/nuxt-i18n/src/index.js
- /var/task/node_modules/@nuxt/core/dist/core.js
- /var/task/now__launcher.js- /var/runtime/UserFunction.js
- /var/runtime/index.js  
Error: Cannot find module 'vue-template-compiler'  
Require stack:  
- node_modules/nuxt-i18n/src/helpers/components.js  
- node_modules/nuxt-i18n/src/helpers/routes.js  
- node_modules/nuxt-i18n/src/core/hooks.js  
- node_modules/nuxt-i18n/src/index.js  
- node_modules/@nuxt/core/dist/core.js  
- now__launcher.js  - /var/runtime/UserFunction.js  
- /var/runtime/index.js  at Object.<anonymous> (node_modules/nuxt-i18n/src/helpers/components.js:6:18)  at Generator.next (<anonymous>)2020-09-08T01:33:23.805Z f618bd89-7fad-41c4-a5a1-270d0c8e5373    ERROR   位 Error while initializing nuxt: /var/task/node_modules/nuxt-i18n/src/helpers/components.js:1Error: Cannot find module 'vue-template-compiler'Require stack:- /var/task/node_modules/nuxt-i18n/src/helpers/components.js- /var/task/node_modules/nuxt-i18n/src/helpers/routes.js- /var/task/node_modules/nuxt-i18n/src/core/hooks.js- /var/task/node_modules/nuxt-i18n/src/index.js- /var/task/node_modules/@nuxt/core/dist/core.js- /var/task/now__launcher.js- /var/runtime/UserFunction.js- /var/runtime/index.js    at Object.<anonymous> (/var/task/node_modules/nuxt-i18n/src/helpers/components.js:6:18)    at Generator.next (<anonymous>) {  code: 'MODULE_NOT_FOUND',  requireStack: [    '/var/task/node_modules/nuxt-i18n/src/helpers/components.js',    '/var/task/node_modules/nuxt-i18n/src/helpers/routes.js',    '/var/task/node_modules/nuxt-i18n/src/core/hooks.js',    '/var/task/node_modules/nuxt-i18n/src/index.js',    '/var/task/node_modules/@nuxt/core/dist/core.js',    '/var/task/now__launcher.js',    '/var/runtime/UserFunction.js',    '/var/runtime/index.js'  ]}RequestId: f618bd89-7fad-41c4-a5a1-270d0c8e5373 Error: Runtime exited with error: exit status 1Runtime.ExitError
bug 馃悰

Most helpful comment

Should be fixed in v6.14.2.
Sorry for the trouble.

All 5 comments

I think I've fixed that on master already (https://github.com/nuxt-community/i18n-module/commit/095cc78ca46a075b979fd9f35a518b1d8a613969). Will make a release soon.

Released v6.14.0 that should fix it.

@rchl Thanks!
It seems this has introduced a bug in the sitemap module (https://github.com/nuxt-community/sitemap-module/issues/157)

Should be fixed in v6.14.2.
Sorry for the trouble.

@rchl Your fix seemed to have solved it. Thanks for the very fast solution!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maxmckenzie picture maxmckenzie  路  15Comments

pi0 picture pi0  路  18Comments

lucassith picture lucassith  路  28Comments

fanwenfu picture fanwenfu  路  15Comments

adetbekov picture adetbekov  路  21Comments