i18n icon indicating copy to clipboard operation
i18n copied to clipboard

[next] process not defined

Open ma-jahn opened this issue 2 years ago • 2 comments

Hi @kazupon

First of all, thank you very much for your work on nuxt-i18n! Especially for making it work on Nuxt 3.

We are already using it and it was working like a charm.

One of the recent commit introduces a bug and we are no longer able to actually build our application. Both nuxt generate and nuxt build are failiing.

This can be resolved by disabling detectBrowserLanguage. It was throwing a server request unexpected error Error.

This is fine for us. More critically is this line:

https://github.com/nuxt-community/i18n-module/blob/80dffcc464cfb5a65ec703ac938eab66b07ce578/packages/nuxt-i18n/src/runtime/utils.ts#L166

After running nuxt generate or nuxt build && nuxt preview we receive a process is not defined.

The !process.static is not working since process is not defined. typeof process !== 'undefined' && !process?.static is working.

I know, Nuxt 3 Support is currently only an early alpha, so please tread this as a FYI :)

ma-jahn avatar May 20 '22 08:05 ma-jahn

@kazupon thanks for fixing this issue, however now static pages generated with nuxt generate and target: 'static' (Nuxt 3.0.0-rc.3) throw error TypeError: t.$t is not a function.

We were using static generation with version 8.0.0-alpha.0-27531750.4e4cffe and it was working. Then after we upgraded to 8.0.0-alpha.0-27551479.0f88897 (to get route localization) it stopped working with that error.

akasummer avatar May 24 '22 11:05 akasummer

@akasummer Try the latest Alpha. With this i can run nuxt generate and use useLocalePath composable :v:

ma-jahn avatar Aug 17 '22 07:08 ma-jahn

I think this issue have already fixed. So close

kazupon avatar Sep 20 '22 15:09 kazupon