kb
Explore posts from serversuseAsyncData/useFetch > Function > Pinia Action - Best practices?
Hey folks, looking for some advice. I currently have something like this
so I already think im using it weird, but then that
fetchDetails
is in the component, and it has some logic on building a payload, which ultimately then fires off a pinia action, and then our pinia action, uses useFetchApi
(which is a composable of $fetch) - so were now at like 4 levels of execution lol, it just feels a bit icky.
Im just wondering what the best practices here might be, like the useAsyncData at the top, would that be advised/not advised given the scenario ive explained?7 replies
Nuxt OG Image works locally but not deployed
Hey, I can see my og image locally in the dev tools, but it is not doing it when deploying.
Is it because it doesnt put the image in
public
folder but instead https://x.vercel.app/__og-image__/image/stores/x-test-store-3733/og.png
I am currently trying a local build & serve10 replies
NuxtImg + Vercel
Im using NuxtImg on Vercel, but I cannot figure out what I need to put in the
nuxt.config.js
because the docs say im supposed to supply every custom width? (https://image.nuxt.com/providers/vercel)
I am running vuetify, and tailwind, if this helps. But as far as sizes, in the given component, im rendering out a few images, with unique sizes per, where im passing this; into my NuxtImg, sizes (in a loop)
So what exactly does my nuxt config want me to put, for it to work on vercel? thx!!11 replies
N2 > 3 server middleware issue
Hey, Im trying to transplant some functionality from a nuxt2 project, where we had
~/server_middleware/authauth.js
which has some imports in like so now in nuxt3, I have made ~\server\api\authauth.post.js
which i think is right? and those same imports with updated pathing like import { getStrategyCredentials, getStrategyEndpoint } from '../../utils/authCredentials'
but I get [15:14:52] ERROR [worker reload] [worker init] Cannot find module 'C:\Users\constants\auth' imported from C:\Users\myuser\Repos\myrepo\.nuxt\dev\index.mjs
any ideas?3 replies
Make Nuxt Icon <Icon> a global component?
Hi, we are using nuxt 3, and im using the NuxtIcon module https://nuxt.com/modules/icon - but right now we dont have our components auto importing, so i wondered how can I make it so I dont need to do
import { Icon } from '#components'
in every component?4 replies
Occasional Build Failures
Is something going on currently? I'd been running great for days and now getting a lot of
/service/85702912-9462-4f78-ab6a-06d10c35e865?id=f74c32d6-2292-47ec-9bb1-0fa7d1267ba8
just curious :-) - my project uses the cron scheduling to rebuild every 15m i believe6 replies
Using Cron instead of scheduling in code
Im using
node-schedule
to do the following in my code;
but just noticed the Cron Schedule on railway settings, could I do away with the scheduler-in-code stuff with this, and just my code self executes runStuff()
- or am i misunderstanding the cron stuff on railways side of things8 replies
failed to resolve component
have just followed this pretty much verbatim: https://levelup.gitconnected.com/using-fontawesome-icons-with-nuxt-3-e390bd15c0fb
but im getting im using nuxt 3 and haven't imported this component explicitly
4 replies
CDCloudflare Developers
•Created by kb on 11/21/2023 in #pages-help
Nuxt Project Wont Publish
Howdy, ive got a nuxt 2.17 project that works fine locally, running node 18.18.2 (which I have as a CF node env) - but I just cant get past this issue
I have a yarn.lock file there, and have tried all sorts of build commands,
yarn build
yarn generate
I just can't understand whats wrong, even from that log.2 replies