luhu
"#build/nuxt.config.mjs" is not defined
Hi, I'm trying to migrate away from auto imports and after fixing every import after disabling it in the nuxt config, I can't run the unit tests anymore. They do complain about
Package import specifier "#build/nuxt.config.mjs" is not defined in package /node_modules/nuxt/package.json imported from /node_modules/nuxt/dist/app/nuxt.js
.
I've tried mocking the file or adding it as an alias in the vitest config but it's not working. Any idea on how to fix it?5 replies
test-utils wont register custom plugins
I'm currently migrating away from the auto imports and since the unit tests are not working anymore it seems like I need to switch to nuxt test utils (away from a custom setup with the vue test utils).
But now my custom nuxt plugins are not registered anymore (useNuxtApp does not include them). I just get
$myPlugin is not a function
. Any ideas on how to debug this?6 replies
'$auth' is of type 'unknown'.ts (18046)
After upgrading to latest nuxt (3.13.0), typescript (5.5.4) and all dependencies (newly created lock file) I get an error for all custom nuxt plugins I have created, e.g. '$auth' is of type 'unknown'.ts (18046). It worked fine in the version before.
I figured it would be a problem with typescript 5.5.4 in combination with eslint and nuxt, but as far as I see nuxt is using the very same typescript version right now.
Any ideas on what I can do or how I can debug this?
12 replies
Storybook in Nuxt: Anyone got it running?
So I'm trying to get Storybook running in our nuxt3 project for a few months now (waiting for updates of the modules again and again) and I'm really disappointed in the nuxt eco system that it still seems to be impossible to get Storybook running with all needed features. Both available integrations (https://github.com/nuxt-modules/storybook and https://github.com/storybookjs/storybook-nuxt) are not really maintained anymore, several people are raising issues about the same problems again and again.
Am I really one of the few people that want to have storybook? It's really a necessary tool when it comes to developing on enterprise platforms in bigger teams. And setting it up in a react project is really a matter of minutes rather than hours.
Did anyone get Storybook running with nuxt, with all the magic like useNuxtApp(), composables, auto imports, Nuxt Link, NuxtIcon, etc?
I also tried to get histoire integrated but it seems to have similar issues. I have opened bug reports. Let's see if they will be adressed.
3 replies