-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Not work SPA (ssr: false
)
#2029
Comments
This was introduced since beta.11 |
I'm running into the same issue. Have you maybe found a workaround for now? |
For now i reverted to "8.0.0-beta.10-28003311.2c39470"" |
I've fixed this issue. |
I got a different error now: @aps-services/render:build: ERROR Plugin error - Unable to get file name for unknown file "381c911f".
@aps-services/render:build:
@aps-services/render:build: at error (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rollup/dist/es/shared/node-entry.js:2125:30)
@aps-services/render:build: at Object.FileEmitter.getFileName (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rollup/dist/es/shared/node-entry.js:24128:24)
@aps-services/render:build: at /mnt/share/dev/code/poc-ts-boilerplate/node_modules/@nuxtjs/i18n/dist/module.mjs:1216:50
@aps-services/render:build: at Array.reduce (<anonymous>)
@aps-services/render:build: at Object.generateBundle (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/@nuxtjs/i18n/dist/module.mjs:1215:44)
@aps-services/render:build: at /mnt/share/dev/code/poc-ts-boilerplate/node_modules/rollup/dist/es/shared/node-entry.js:24551:40
@aps-services/render:build: at processTicksAndRejections (node:internal/process/task_queues:96:5)
@aps-services/render:build:
@aps-services/render:build: ERROR: command finished with error: command (/mnt/share/dev/code/poc-ts-boilerplate/apps/render) yarn run build exited (1) |
hmm 🤔 |
I can confirm, also useing "ssr:false" in my project. |
I'm in the same boat:
Downgrading from
I'm on Nuxt 3.4.3, but @nuxt/kit and @nuxt/schema were updated to 3.5.0. |
Same here ✋ nuxt 3.5.0 ssr:false, beta-12 Downgrading to beta-11 fixes it for me as well |
Ah yes @stockholmz , I had not seen, the PR is very recent, thanks ! |
For me the working combo was:
|
thanks to gbyesiltas I could also solve the problem, but I had to make a small change. Installing the @nuxtjs/i18n-edge isn't enough, you should also register it as module. So this is wrong (for now): Instead do this: and put your config like this:
I think this will be unnecessary after bug fix goes in to the next (main) branch. |
that didn't work for me @serdarde =( |
Not sure if this is the right issue ... I'm getting an error like the one reported in #2077 but I cannot see the import When I try following this procedure here, and I get somewhere closer to the goal. When replacing
I've tried to set it (which requires my prettier config to be renamed to EDIT: Renaming the config file was not required - it works for me having the config file named |
Just found out that adding |
Mine was already with |
Something in the vicinity of Line 77 in 9f9fd2e
I'm looking at the mjs module in the const baseDir = dirname$1(query.from);
const code = `import { precompileMessages, formatMessage } from '#build/${NUXT_I18N_TEMPLATE_INTERNAL_KEY}'
import { isSSG } from '#build/${NUXT_I18N_TEMPLATE_OPTIONS_KEY}'
import { isObject, isFunction } from '@intlify/shared'
export default async function(context) {
const loader = await import(${JSON.stringify(`${resolve$1(baseDir, query.target)}?config=true`)}).then(m => m.default || m)
const config = isFunction(loader)
? await loader(context)
: isObject(loader)
? loader
: {}
__DEBUG__ && console.log('loadConfig', config)
if (process.dev || process.server || !isSSG) {
config.messages = await precompileMessages(config.messages, ${JSON.stringify(query.c)})
return config
} else {
__DEBUG__ && console.log('already pre-compiled vue-i18n messages')
let messages = null
try {
const key = \`/i18n-config-${query.c}.js\`
messages = await import(/* @vite-ignore */ key /* webpackChunkName: nuxt-i18n-config-${query.c} */).then(
m => m.default || m
)
} catch (e) {
console.error(format(e.message))
}
config.messages = messages || {}
return config
}
}`; Which if you'll see I've updated my package.json to use the edge version and I'm still seeing this. {
...
"devDependencies": {
...,
"nuxtjs/i18n": "npm:@nuxtjs/i18n-edge",
...,
}
...
}
In short, this "unplugin" routine needs to also check to see if nuxt is set for SSR, and to not look for a pre-render config in the event that happens. |
@gbyesiltas answer works for me |
Thanks @gbyesiltas
|
@apss-pohl , you read the discussion above? There is no officially released fix yet (unfortunately). |
I was reading that the issue was resolved for some users and there was a new release, that why i gave it a try. But i`ll be patient and keep testing. |
I don't know if this issue is related to my problem. While building on Netlify i got this error after updating i18n to beta 12 from beta 10: |
Does putting the package version in edge is a kind of downgrade ? I applied this solution (edge) to solve my build and it worked for me (after rolling my head on the keyboard for an hour). What are the pros and cons ? |
@aburii Can you help me but I also have a problem when I followed what you said. I tried to run "nuxt generate" command and here is my error |
related issue When the same locale file ( |
Thanks @gbyesiltas |
Same here nuxt 3.5.2 ssr:false, beta-12 |
1 set
2 install
3 and change
works for me. nuxt 3.5.2 ssr:false, beta-12 |
After many hours of trying different combinations this one worked for me:
Works for:
|
Thank you |
Environment
Reproduction
https://stackblitz.com/edit/github-xhfdq1-de15an
Describe the bug
Run "yarn build".
Then browse to ".nuxt/dist/client/_nuxt/i18n.options.*.js". It's content will look like this:
Imported file " '/i18n-config-5fcc7ca7.js';" (with the dashes) is not created at all, therefore it breaks.
Additional context
I already opened a issue in the nuxt tracker (nuxt/nuxt#20518) but now i am wondering if it is rather related to the module. If not it can be closed here.
Logs
No response
The text was updated successfully, but these errors were encountered: