Ragura
Ragura
NNuxt
Created by Jox on 11/5/2024 in #❓・help
Template ref "refName" used on a non-ref value. It will not work in the production build.
Haven't seen that issue before, but with it probably being a Vue issue and not Nuxt you might want to repost this on the Vue Discord channel too.
10 replies
NNuxt
Created by Jacko on 7/5/2024 in #❓・help
Is there a recommended way to start a nuxt project ?
There's a few starter templates available here: https://nuxt.new/ However, Nuxt isn't difficult to set up incrementally. You basically create the folders you need when you need them. As for modules such as ESLinst, just browse those on nuxt.com or use the devtools to install them. Most of them are zero-config or close to. You can also use the VSCode extension Nuxtr to help you with creating the right folder structure.
2 replies
NNuxt
Created by Jacko on 7/5/2024 in #❓・help
what’s the difference between antfu/eslint config vs the eslint plugin ?
Antfu's ESLint config includes a lot more rules than the standard Nuxt ESLint config. I use it for all my applications. It really comes down to how opinionated you want your rules to get. Of course, you can always disable rules you don't like separately.
2 replies
NNuxt
Created by MinecraftStorage on 6/28/2024 in #❓・help
How to assign a middleware to custom routes?
You're free to open a PR to add it to the docs! 🙂
6 replies
NNuxt
Created by MinecraftStorage on 6/28/2024 in #❓・help
How to assign a middleware to custom routes?
You can add middleware programmatically with the pages:extend hook. https://nuxt.com/docs/guide/directory-structure/middleware#setting-middleware-at-build-time This usage is specifically called out with custom routing here: https://nuxt.com/docs/guide/recipes/custom-routing#router-config
6 replies
NNuxt
Created by Maxi on 7/2/2024 in #❓・help
TypeError: Failed to fetch dynamically imported module:
You're going to have to try to reproduce this in a minial reproduction if you need help with this. It's too project specific.
12 replies
NNuxt
Created by Nikhil Handa on 7/2/2024 in #❓・help
Unable to upgrade to 3.12.2 using nuxt
You can try this: https://nuxt.com/docs/api/commands/upgrade There's a force flag you can set.
3 replies
NNuxt
Created by Maxi on 7/2/2024 in #❓・help
TypeError: Failed to fetch dynamically imported module:
There's really no reason for Arc specifically to break your site (I use it all the time with Nuxt). But do look into extensions you might be using that you don't in the other browsers.
12 replies
NNuxt
Created by Stefan on 7/1/2024 in #❓・help
Response Body in Error with useFetch
You can get both the body and error by destructuring the return value of the useFetch promise.
const { data, error } = await useFetch('myurl')
const { data, error } = await useFetch('myurl')
3 replies
NNuxt
Created by Nenad Novakovic on 6/20/2024 in #❓・help
Get return type from api route?
Interesting that you can get the types that way, thanks for following up on your own issue 🙂 I wonder though if it wouldn't be better to create a type/interface inside the API route (or a shared types folder) and explicitly make sure the return value is of that type. Then you wouldn't have to look up the type anywhere else and could import it.
6 replies
NNuxt
Created by Prem on 6/20/2024 in #❓・help
`$fetch` error handling.
The above is how I'm handling it now too. Made a separate function parseError to do the type checking so I wouldn't have to put the boilerplate there all the time, but this is the recommended way to handle errors in a try/catch regardless of using Nuxt or not. You should double check which fields you want from the object by inspecting the FetchError type (such as statusMessage).
3 replies
NNuxt
Created by Zampa on 6/12/2024 in #❓・help
With the new /app dir structure, where do we place:
Yep, you can just put all of that under app.
3 replies
NNuxt
Created by Ragura on 6/15/2024 in #❓・help
Vitest auto-import functions
This works perfectly, thanks! Is this still fine to do if I'm using it inside a layer, and then the app that extends from the layer also has these auto-imported as part of its test setup, duplicating the types?
6 replies