Coder Social home page Coder Social logo

Error after deployment about core HOT 10 CLOSED

Lucas-Gruber avatar Lucas-Gruber commented on August 14, 2024
Error after deployment

from core.

Comments (10)

Lucas-Gruber avatar Lucas-Gruber commented on August 14, 2024 2

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!

from core.

mhetreramesh avatar mhetreramesh commented on August 14, 2024 1

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

from core.

farnabaz avatar farnabaz commented on August 14, 2024 1

Could you try by adding shamefully-hoist=true into .npmrc file in project root and clean install?
Most likely, this happens because of PNPM which cause generation to miss some packages.

from core.

Barbapapazes avatar Barbapapazes commented on August 14, 2024

Hey 👋,

Could you provide a reproduction? Or the piece of code that generate this?

from core.

Lucas-Gruber avatar Lucas-Gruber commented on August 14, 2024

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.

Repo: https://github.com/ArisCorporation/Website

from core.

Lucas-Gruber avatar Lucas-Gruber commented on August 14, 2024

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

from core.

Lucas-Gruber avatar Lucas-Gruber commented on August 14, 2024

I have another update!

I found 2 problems.

  1. The pinia nuxt module is one problem.
  2. And when i have the pnpm lockfile in the repo it brings these weird "cannot access x before intialization". When i delete the lockfile it works fine.

from core.

Saganic avatar Saganic commented on August 14, 2024

+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"
  }
}

from core.

Lucas-Gruber avatar Lucas-Gruber commented on August 14, 2024

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.

from core.

atinux avatar atinux commented on August 14, 2024

Closing, feel free to re-open if the error persists after following farnabaz comment.

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.