Jure
Jure
Explore posts from servers
NNuxt
Created by Jure on 11/1/2024 in #❓・help
Basic nuxt/eslint configuration
@kapa.ai eslint.config.mjs looks exactly like your example... I also expected that this file includes all the necessary configurations for Nuxt... but it I still get an error: 'defineNuxtConfig' is not defined.eslintno-undef Updating the eslint config like this remove the error:
// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt({
rules: {
'no-undef': 'off',
},
})
// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs'

export default withNuxt({
rules: {
'no-undef': 'off',
},
})
But I'm not sure if this is the best practice...
10 replies
NNuxt
Created by scrongly on 10/31/2024 in #❓・help
Cannot start nuxt: EMFILE: too many open files
Me too. On fresh Nuxt install. M3
14 replies
NNuxt
Created by Jure on 10/9/2024 in #❓・help
$fetch is not getting correct type from server endpoint
you are right... thx
6 replies
NNuxt
Created by Jure on 10/9/2024 in #❓・help
$fetch is not getting correct type from server endpoint
One of the best Nuxt 3 features is that it can infer types from server routes... but I think that there are constantly issues with this. Or am I doing something wrong?
6 replies
NNuxt
Created by Jure on 10/9/2024 in #❓・help
$fetch is not getting correct type from server endpoint
@manniL / TheAlexLichter please help if you can 🙂
6 replies
NNuxt
Created by Jure on 8/22/2024 in #❓・help
Nuxt Image: IPX_FILE_NOT_FOUND
// ./.output/server/node_modules/ipx/dist/shared/ipx.b027cc1c.mjs
const filePath = join(dir, id)
console.log(filePath) <---
// ./.output/server/node_modules/ipx/dist/shared/ipx.b027cc1c.mjs
const filePath = join(dir, id)
console.log(filePath) <---
Output: /home/user/domain.com/.output/public/images/32934/i.jpg Like I've suspected... IPX is looking for image in the wrong dir (.output). How to fix this?
2 replies
DTDrizzle Team
Created by Jure on 3/14/2024 in #help
How to use JSON column type?
No description
2 replies
DTDrizzle Team
Created by Jure on 2/29/2024 in #help
MySQL select().from() type
----- const users = await db.select().from(models.users).execute() .execute() fixed the problem 🙂
5 replies
DTDrizzle Team
Created by Jure on 2/29/2024 in #help
MySQL select().from() type
const users = await db.select().from(models.users).execute() .execute() fixed the problem 🙂
5 replies
DTDrizzle Team
Created by Jure on 2/29/2024 in #help
MySQL select().from() type
Not MySqlSelectBase.
5 replies
DTDrizzle Team
Created by Jure on 2/29/2024 in #help
MySQL select().from() type
I need such "return" type: [] | Promise<{ row object }>
5 replies
CDCloudflare Developers
Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
@sylphritz do you mind asking you how do you apply migrations on production D1? From local CLI and wrangler command npx wrangler d1 migrations apply {dbname}? I'm trying to apply migrations in the CF Pages "deploy script" like npm run build && npx wrangler d1 migrations apply {dbname} so migrations would be executed right after deployment / pushing code.
27 replies
CDCloudflare Developers
Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
But the biggest issue is that unless you build the project first(or use a binding proxy), then the dev process won't have access to any bindings.
I'm not sure if I understand you correctly... since I'm also a newbie to D1 and the whole development process... but when I run pages dev --d1=DB -- npm run dev I have access to D1 binding --d1=DB and can use local DB over the defined binding.
27 replies
CDCloudflare Developers
Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
True, it already persists in the .wrangler/ dir but with "random" path to the db.sqlite. For me is convenient to have manually defined path since I'm using Drizzle Studio https://orm.drizzle.team/drizzle-studio/overview - to be able to define path to DB file in the drizzle.config.ts and then browse the DB with simple command npx drizzle-kit studio.
27 replies
CDCloudflare Developers
Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
It would... isn't that what you want for local development?
27 replies
CDCloudflare Developers
Created by Sylphritz on 9/19/2023 in #pages-help
Is there a way to connect to D1 locally in, say, a Nuxt.js app in dev mode?
I'm using this command: npx wrangler pages dev --local --persist-to=./db.sqlite --d1=DB -- npm run dev
27 replies