Open Lucas-Gruber opened 5 days ago
Hey 👋,
Could you provide a reproduction? Or the piece of code that generate this?
I am trying to find the piece of code that is causing this.
If not, I'll send the repo of my project.
I'm not at home right now, but I'll do it right after!
I have not yet found the piece of code that is causing the error.
I will continue to test and see if I can find it. In the meantime, I will send my project anyway, as you may know more quickly what the problem is.
Okay, i have an update. The error:
[nuxt] [request error] [unhandled] [500],Cannot access 'default' before initialization
at chunks/routes/renderer.mjs:1:25256
at async chunks/routes/renderer.mjs:1:25209
at async ye (chunks/routes/renderer.mjs:1:26859)
at async Object.handler (chunks/routes/renderer.mjs:1:29357)
at async Object.handler (chunks/runtime.mjs:1:77446)
at async chunks/runtime.mjs:1:80378
at async chunks/runtime.mjs:1:130717
Is from dayjs-nuxt module.
Now i removed the dayjs module and get now this error:
[nuxt] [request error] [unhandled] [500],Cannot access 'bS' before initialization
at chunks/routes/renderer.mjs:1:25282
at async chunks/routes/renderer.mjs:1:25219
at async chunks/routes/renderer.mjs:1:27415
at async Object.handler (chunks/routes/renderer.mjs:1:26359)
at async Object.handler (chunks/runtime.mjs:1:75815)
at async chunks/runtime.mjs:1:78952
at async chunks/runtime.mjs:1:128292
[nuxt] [request error] [unhandled] [500],Cannot access 'bS' before initialization
at chunks/routes/renderer.mjs:1:25282
at async chunks/routes/renderer.mjs:1:25219
at async chunks/routes/renderer.mjs:1:27415
at async Object.handler (chunks/routes/renderer.mjs:1:26359)
at async Object.handler (chunks/runtime.mjs:1:75815)
at async chunks/runtime.mjs:1:78952
at async chunks/runtime.mjs:1:128292
at async errorHandler (chunks/runtime.mjs:1:116654)
at async chunks/runtime.mjs:1:79104
at async chunks/runtime.mjs:1:128292
I haven't found the source of the error yet, but I'm doing my best
I have another update!
I found 2 problems.
+1 this appears to be an issue with pnpm.
I have a project with zero additional deps, using npm the build works fine, using pnpm it errors with the same message as OP.
Node version: v21.7.3 pnpm version: 8.6.12 npm version: 10.5.0
{
"name": "nuxt-app",
"type": "module",
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxthub/core": "^0.7.0",
"nuxt": "^3.12.2",
"vue": "latest"
},
"devDependencies": {
"@antfu/eslint-config": "^2.21.2",
"eslint": "9.5.0"
}
}
Alright, unfortunately i cannot use NuxtHub for my project, because it is not possible to use the @directus/sdk with CloudFlare Pages. It doesn't support the credential property and i get this error:
The 'credentials' field on 'RequestInitializerDict' is not implemented
But this isn't a NuxtHub related issue.
I am also having same problem for my fresh new application deployed without any additional dependencies, at some point it was working though. Everything works locally but not on cloudflare.
23:07:03.399
Connected to production deployment logs...
23:07:05.391
GET 500 /
[nuxt] [request error] [unhandled] [500],global is not defined
at chunks/build/server.mjs:1:157309
[nuxt] [request error] [unhandled] [500],Cannot access 'default' before initialization
at chunks/routes/renderer.mjs:1:113671
at async chunks/routes/renderer.mjs:1:113624
at async zn (chunks/routes/renderer.mjs:1:115291)
at async Object.handler (chunks/routes/renderer.mjs:1:117789)
at async Object.handler (chunks/runtime.mjs:1:74628)
at async chunks/runtime.mjs:1:77560
at async chunks/runtime.mjs:1:111660
at async errorHandler (chunks/runtime.mjs:1:106396)
at async chunks/runtime.mjs:1:77712
at async chunks/runtime.mjs:1:111660
Describe the bug Hello, i don't really know if this is the right place for this issue.
When i deploy my Nuxt App to NuxtHub, everything seems right but when i want to open the Website i following error:
But when i deploy my page to Netlify for example or use it local with node it works fine.
And i get an error in server log, but i don't know if this the error.
Steps to reproduce Steps to reproduce the behavior:
Expected behavior Website shows the index page.