isakwang
isakwang
Explore posts from servers
NNuxt
Created by isakwang on 8/27/2024 in #❓・help
Non fatal server error
Hello How can I return a non fatal server error? As soon as I set the response header as 201 for example it is treated as a fatal error, when I just want to treat it as a form error
7 replies
NNuxt
Created by isakwang on 8/26/2024 in #❓・help
read cookie on server
Hello I have an object that I store as a cookie so it can be read both on client and server-side. How can I get a specific attribute of the cookie, like id?
3 replies
NNuxt
Created by isakwang on 7/28/2024 in #❓・help
storing bearer tokens on server
Hello Im trying to use the Kinde management API but im a bit unsure about the best way to do so is. It is authenticated with Oauth2 and that returns a bearer token that can be used for some time. Should I request a new token each time, or is there a way to get a token once and use it until it expires? Docs: https://kinde.com/api/docs/#kinde-management-api
1 replies
NNuxt
Created by isakwang on 6/29/2024 in #❓・help
adding params to UI NuxtLink component
Hello I would like to add params to a link in the DashboardSidebarLinks component. Is that possible?
1 replies
NNuxt
Created by isakwang on 6/17/2024 in #❓・help
v-for where v-if only affects one element
Hello Not sure how to google for this so asking here. I have a list of elements with an @click directive and a v-if that toggles some elements within the parent. Currently im using a single ref, but that means all off them expand when one is clicked instead of that one. How can I fix this Example <div v-for="item in list" @click="expand"> <h1>{{item.label}}</h1> <p v-if="expand">{{ item.description }}</p> </div>
4 replies
NNuxt
Created by isakwang on 5/9/2024 in #❓・help
importing stripe in API
Hello Im looking at how to integrate stripe into Nuxt and have to create a server route to deal with creating sessions. When importing the package im getting an error that they can´t find the package, but it is on npm. Any obvius solutions? Error: [worker reload] [worker init] Cannot find package '@stripe/stripe-js' import {loadStripe} from '@stripe/stripe-js'; export default defineEventHandler(async (event) => { const stripe = await loadStripe(process.env.STRIPE_SECRET_KEY); const session = await stripe.checkout.session.create({ success_url: '/response/success', line_items: [ { price: 'price_1PEZkcP1SGiKSfI8iw0DBc1q', quantity: 3 }, ], mode: 'payment' }) return session }) Relevant docs https://docs.stripe.com/api/checkout/sessions/create https://docs.stripe.com/libraries/stripejs-esmodule#web-stripejs-esmodule https://docs.stripe.com/checkout/quickstart
1 replies
NNuxt
Created by isakwang on 5/2/2024 in #❓・help
Cloudflare fail to publish
Hello Im getting an error when deploying to github, but after googling and trying to find the error in my project im stumped. Has anyone else ran into this and fixed it? It runs fine on both Nuxt dev and build/preview Error below and buildlog attached Error: Failed to publish your Function. Got error: Uncaught ReferenceError: global is not defined at chunks/runtime.mjs:1:30871
4 replies
NNuxt
Created by isakwang on 4/29/2024 in #❓・help
V-if not working
I have this set of if statements, but they aren't executing properly. I have tried both row.status and row.status.value but the former returns the value without the component and the latter returns the first statement even though the value is Completed. What am i doing wrong? <template #status-data="{ row }"> <UBadge v-if="row.status == Pending" color="yellow" :label="row.status" /> <UBadge v-else-if="row.status == Completed" color="green" :label="row.status" />
3 replies
NNuxt
Created by isakwang on 4/11/2024 in #❓・help
Error using Nuxt sanity module
Hello. Getting an error when fetching data using the @nuxtjs/sanity module that I don't really get. It does fetch all the data so im not sure what goes wrong, but it does disappear when i remove the useSanityQuery composable. Any ideas? /_nuxt/node_modules/.pnpm/[email protected]/node_modules/parse-headers/parse-headers.js?v=59aa2b87' does not provide an export named 'default'
2 replies
NNuxt
Created by isakwang on 4/5/2024 in #❓・help
Page not found when using Kinde login
Hello Trying out Kinde, but im having some issues when deploying it to cloudflare pages. The login works locally, but i get this when deploying Error: Page not found: /api/login. When looking at the buildlogs i can't see the api/login path among the other api either. Any ideas for what this can be?
1 replies
NNuxt
Created by isakwang on 3/18/2024 in #❓・help
Error after update
Getting this fault when trying to use nuxt supabase login. Could this be because of the error in 3.11? Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.cache/vite/client/deps/ufo.js?v=5e84139c' does not provide an export named 'joinRelativeURL' (at paths.mjs:1:10)
2 replies
NNuxt
Created by isakwang on 3/7/2024 in #❓・help
Error with node version on build
Hello Im getting this weird error when trying to deploy to vercel about the wrong version of esbuild. Can't find any info on google either. As far as i can tell if references the node version in package.json, but there has never been a node version there before [00:00:11.797] Running build in Washington, D.C., USA (East) – iad1 [00:00:11.905] Retrieving list of deployment files... [00:00:12.362] Downloading 89 deployment files... [00:00:15.778] Restored build cache [00:00:15.848] Running "vercel build" [00:00:16.357] Vercel CLI 33.5.4 [00:00:17.209] Installing dependencies... [00:00:17.260] bun install v1.0.30 (1424a196) [00:00:17.273] Resolving dependencies [00:00:17.598] Resolved, downloaded and extracted [2] [00:00:17.605] Saved lockfile [00:00:18.776] /vercel/path0/node_modules/vite/node_modules/esbuild/install.js:133 [00:00:18.776] throw new Error(Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}); [00:00:18.776] ^ [00:00:18.777] [00:00:18.777] Error: Expected "0.19.12" but got "0.20.1" [00:00:18.777] at validateBinaryVersion (/vercel/path0/node_modules/vite/node_modules/esbuild/install.js:133:11) [00:00:18.777] at /vercel/path0/node_modules/vite/node_modules/esbuild/install.js:286:5 [00:00:18.777] [00:00:18.777] Node.js v20.11.1 [00:00:18.777] [00:00:18.778] error: postinstall script from "esbuild" exited with 1 [00:00:18.799] Error: Command "bun install" exited with 1 [00:00:19.545]
1 replies
NNuxt
Created by isakwang on 3/8/2023 in #❓・help
V-for on proxy with array in it
No description
23 replies