nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.15k stars 554 forks source link

Nuxt Dev server broken after 2.16.0 update #1773

Closed tobychidi closed 5 months ago

tobychidi commented 6 months ago

Environment

Version

v2.16.0

Reproduction

Set this up on CodeSandBox. It is still not running. Reproduction

Description

After the update to the latest versions and I try to run Nuxt dev server, the server crashes and reverting to v2.15.2 resolves the issue. Pls help.

Additional context

No response

Logs

No driver set for storage mount point "50".                                                    nitro 9:15:27 AM

 WARN  No driver set for storage mount point "100".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "200".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "300".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "400".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "500".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "600".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "700".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "800".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "900".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "950".                                                   nitro 9:15:27 AM

 WARN  No driver set for storage mount point "DEFAULT".                                               nitro 9:15:27 AM

ℹ Tailwind Viewer: http://localhost:3000/_tailwind/                                       nuxt:tailwindcss 9:15:27 AM

 ERROR  [uncaughtException] callback is not a function                                                      9:15:28 AM

  at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
benjamincanac commented 6 months ago

We won't be able to help without a reproduction.

tobychidi commented 6 months ago

We won't be able to help without a reproduction.

I have updated the description with a link to a CodeSandBox reproduction. Once I update to the latest versions of Nuxt and UI, the app breaks.

tobychidi commented 6 months ago

Is no one else having this problem?

noook commented 6 months ago

Your reproduction has npm and pnpm mixed. According to your issue you are using pnpm and this might have something to do with your node_modules. Try deletingpackage-lock.json and reinstalling with pnpm, this worked for me: https://codesandbox.io/p/devbox/clever-keldysh-forked-mqp3fr?workspaceId=c9efb319-914c-430c-98b5-2a634e608bca

noook commented 6 months ago

Can I close this @tobychidi ?

cull2203 commented 6 months ago

Is no one else having this problem?

Yes I have the same issue that started 2 days ago when updating the Nuxt UI version from 2.15.2 to 2.16.0. The error is: aliases[key].startsWith is not a function

npm will not install anything nor run dev server

cull2203 commented 6 months ago

Your reproduction has npm and pnpm mixed. According to your issue you are using pnpm and this might have something to do with your node_modules. Try deletingpackage-lock.json and reinstalling with pnpm, this worked for me: https://codesandbox.io/p/devbox/clever-keldysh-forked-mqp3fr?workspaceId=c9efb319-914c-430c-98b5-2a634e608bca

I have tried this and still I am getting errors.

` ERROR aliases[key].startsWith is not a function 9:50:43 AM

at normalizeAliases (node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:78102) at createJITI (node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:248943) at module.exports (node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js:14:10) at loadConfig (node_modules/.pnpm/c12@1.10.0/node_modules/c12/dist/index.mjs:121:34) at loadOptions (nodemodules/.pnpm/nitropack@2.9.6@opentelemetry+api@1.8.0_encoding@0.1.13/node_modules/nitropack/dist/nitro.mjs:4740:66) at createNitro (nodemodules/.pnpm/nitropack@2.9.6@opentelemetry+api@1.8.0_encoding@0.1.13/node_modules/nitropack/dist/nitro.mjs:5076:25) at initNitro (nodemodules/.pnpm/nuxt@3.11.2@opentelemetry+api@1.8.0@parcel+watcher@2.4.1@types+node@20.12.12_@unocss+reset_sx4zig6uzirfzdisjdhrh2rtj4/node_modules/nuxt/dist/index.mjs:3366:23) at async initNuxt (nodemodules/.pnpm/nuxt@3.11.2@opentelemetry+api@1.8.0@parcel+watcher@2.4.1@types+node@20.12.12_@unocss+reset_sx4zig6uzirfzdisjdhrh2rtj4/node_modules/nuxt/dist/index.mjs:4270:3) at async loadNuxt (nodemodules/.pnpm/nuxt@3.11.2@opentelemetry+api@1.8.0@parcel+watcher@2.4.1@types+node@20.12.12_@unocss+reset_sx4zig6uzirfzdisjdhrh2rtj4/node_modules/nuxt/dist/index.mjs:4331:5) at async loadNuxt (node_modules/.pnpm/@nuxt+kit@3.11.2_rollup@4.17.2/node_modules/@nuxt/kit/dist/index.mjs:2570:19)

ERROR aliases[key].startsWith is not a function 9:50:43 AM

 ELIFECYCLE  Command failed with exit code 1.`

tobychidi commented 6 months ago

Can I close this @tobychidi ?

Not yet. I found that the issue is related with another module @vue-email/nuxt once installed. I have updated the reproduction as well.

cull2203 commented 6 months ago

Can I close this @tobychidi ?

Not yet. I found that the issue is related with another module @vue-email/nuxt once installed. I have updated the reproduction as well.

it looks like I cannot use '@nuxt/ui' and '@vue-email/nuxt' together. However, I did get it to work periodically on '@nuxt/ui': '^2.15.2'. There is another issue raised https://github.com/vue-email/nuxt/issues/45

kstraszewski commented 6 months ago

I found a workaround for that. You need to change order of nuxt modules, and move Vue-email/nuxt before Nuxt/ui. It fixes this issue for me.

cull2203 commented 6 months ago

I found a workaround for that. You need to change order of nuxt modules, and move Vue-email/nuxt before Nuxt/ui. It fixes this issue for me.

I have tried your solution and it seems to work when updating to @nuxt/ui '^2.16.0'. The problem I found was the previous version.

My modules now look like this and work as expected, thanks for your input.

modules: [ '@vue-email/nuxt', '@nuxt/ui', '@nuxt/image', '@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt', '@nuxtjs/supabase', '@unlok-co/nuxt-stripe', '@nuxtjs/turnstile', 'nuxt-resend', 'nuxt-rating' ]

Arcadia822 commented 6 months ago

I found a workaround for that. You need to change order of nuxt modules, and move Vue-email/nuxt before Nuxt/ui. It fixes this issue for me.

Thanks for the workaround. Fixed instantly.

vanling commented 5 months ago

holy sh*t! thanks @cull2203 and @kstraszewski you saved me a lot of time with that 'fix' :D

davestewart commented 3 months ago

OK, I git this issue when I set a value in nuxt.options.runtimeConfig that was a Proxy.

When I cloned it to a POJO and set it, no errors.

FWIW the error I think comes from unstorage.

Hope that helps.

titusdecali commented 1 month ago

I'm still getting the same error, even after re-arranging nuxt modules with the following versions. ERROR Cannot start nuxt: aliases[key].startsWith is not a function

    "@nuxt/ui": "^2.18.6",

    "@vue-email/compiler": "^0.8.14",
    "@vue-email/components": "^0.0.19",
    "@vue-email/nuxt": "^0.8.19",
    "@vue-email/render": "^0.0.9",

I've tried putting vue-email at the beginning of the list and nuxt/ui after, and reversed. Nothing seems to work.

  modules: [
    'nuxt-security',
    'nuxt-booster',
    '@nuxtjs/tailwindcss',
    '@nuxtjs/color-mode',
    'shadcn-nuxt',
    '@nuxtjs/supabase',
    'nuxt-lodash',
    '@pinia/nuxt',
    '@pinia-plugin-persistedstate/nuxt',
    '@nuxtjs/tailwindcss',
    '@formkit/auto-animate/nuxt',
    '@formkit/nuxt',
    '@nuxtjs/google-fonts',
    '@nuxt/image',
    'nuxt-custom-elements',
    '@nuxtjs/i18n',
    '@vue-email/nuxt',
    '@nuxt/ui'
  ],