Skip to content
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

Error: [worker reload] Cannot read properties of null (reading 'address') #24423

Open
VladimirCores opened this issue Nov 23, 2023 · 5 comments

Comments

@VladimirCores
Copy link

Environment

Operating System: Linux
Node Version: v18.15.0
Nuxt Version: 3.8.2
CLI Version: 3.10.0
Nitro Version: 2.8.0
Package Manager: yarn@1.22.19
Builder: -
User Config: devtools, ssr, telemetry, app, runtimeConfig, tailwindcss, nitro, imports, ui, eslint, modules, googleFonts, fontMetrics, colorMode
Runtime Modules: @nuxtjs/fontaine@0.4.1, @nuxtjs/google-fonts@3.0.2, @nuxtjs/eslint-module@4.1.0, @nuxt/ui@2.10.0
Build Modules: -

Reproduction

  1. Mounting local storage breaks Nuxt build

export default defineNitroPlugin(() => {
// Mount driver
useStorage().mount('local', fs({ base: './.data' }));
});

  1. yarn dev

Describe the bug

Nuxt wont start.

Additional context

No response

Logs

ERROR [worker reload] Cannot read properties of null (reading 'address') 3:16:48 PM

at _reload (node_modules/nitropack/dist/shared/nitro.37241ef0.mjs:282:38)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processTimers (node:internal/timers:509:9)
at async _applyPromised (node_modules/perfect-debounce/dist/index.mjs:54:10)
@pi0
Copy link
Member

pi0 commented Nov 23, 2023

When build fails or there is critical init error, Nitro seems has a regression and not showing proper error (unjs/nitro#1947)


BTW for your specific issue @VladimirCores i would appreciate a runnable reproduction. Normally you should also configure storage using nitro.storage in nuxt.config rather than a nitro plugin + data is already mounted by nitro using fs-lite driver (more).

@SveinnB
Copy link

SveinnB commented Nov 23, 2023

image
I am also experiencing the same error, which appeared with Nuxt 3.8.2 (?? ... maybe not)
However, this does not prevent Nuxt from starting, and the app works great.
Only a problem when ssr: false

@zola33dsf
Copy link

Hi guys 🙂
I also have the same problem,
I've made a plugin which is looking to localStorage and in my nuxt.config.ts I have the key ssr : false

You can find a quick reproduction :
https://stackblitz.com/edit/github-wfqgfw?file=plugins%2FinitApp.ts

If you can't reproduce run the commands : npx nuxi cleanup and npm run dev

@pi0
Copy link
Member

pi0 commented Nov 23, 2023

This issue will be resolved in the next patch version of nitro. In the meantime, you can safely ignore it.

@FranciscoKloganB
Copy link

FranciscoKloganB commented Nov 26, 2023

I do not know if this can be safely ignored.

My project starts up with this error and no others. Accessing the app on the browser results on a continous loop of 503. I hadn't touched this project in two months. But the only thing that changed between the before and the now was going from Nuxt 3.7.1 to Nuxt 3.8.2; I already did a clean install of the node_modules.

In fact, going from 3.7.1 to 3.7.2 is enough for my project not to work anymore. :\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants