ui icon indicating copy to clipboard operation
ui copied to clipboard

Nuxt Dev server broken after 2.16.0 update

Open tobychidi opened this issue 9 months ago • 8 comments

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)

tobychidi avatar May 10 '24 09:05 tobychidi

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

benjamincanac avatar May 10 '24 09:05 benjamincanac

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 avatar May 11 '24 08:05 tobychidi

Is no one else having this problem?

tobychidi avatar May 14 '24 05:05 tobychidi

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 deleting package-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 avatar May 14 '24 08:05 noook

Can I close this @tobychidi ?

noook avatar May 16 '24 15:05 noook

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 avatar May 18 '24 02:05 cull2203

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 deleting package-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/[email protected]/node_modules/jiti/dist/jiti.js:1:78102) at createJITI (node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:248943) at module.exports (node_modules/.pnpm/[email protected]/node_modules/jiti/lib/index.js:14:10) at loadConfig (node_modules/.pnpm/[email protected]/node_modules/c12/dist/index.mjs:121:34) at loadOptions (node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/nitropack/dist/nitro.mjs:4740:66) at createNitro (node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/nitropack/dist/nitro.mjs:5076:25) at initNitro (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_@unocss+reset_sx4zig6uzirfzdisjdhrh2rtj4/node_modules/nuxt/dist/index.mjs:3366:23) at async initNuxt (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_@unocss+reset_sx4zig6uzirfzdisjdhrh2rtj4/node_modules/nuxt/dist/index.mjs:4270:3) at async loadNuxt (node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]_@unocss+reset_sx4zig6uzirfzdisjdhrh2rtj4/node_modules/nuxt/dist/index.mjs:4331:5) at async loadNuxt (node_modules/.pnpm/@[email protected][email protected]/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.`

cull2203 avatar May 18 '24 02:05 cull2203

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.

tobychidi avatar May 18 '24 14:05 tobychidi

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

cull2203 avatar May 19 '24 02:05 cull2203

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.

kstraszewski avatar May 19 '24 20:05 kstraszewski

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' ]

cull2203 avatar May 20 '24 02:05 cull2203

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.

Arcadia822 avatar May 27 '24 09:05 Arcadia822

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

vanling avatar Jul 04 '24 09:07 vanling

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.

davestewart avatar Aug 06 '24 23:08 davestewart

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'
  ],

titusdecali avatar Oct 08 '24 14:10 titusdecali