roobr
roobr
Explore posts from servers
PPrisma
Created by kmj on 3/28/2024 in #help-and-questions
multiSchema variable
I am trying to do
const authUsers = await prisma.auth.user.findMany()

// Query the user table in the public schema
const publicUsers = await prisma.public.user.findMany()
const authUsers = await prisma.auth.user.findMany()

// Query the user table in the public schema
const publicUsers = await prisma.public.user.findMany()
11 replies
PPrisma
Created by kmj on 3/28/2024 in #help-and-questions
multiSchema variable
I am trying to do const authUsers = await prisma.auth.user.findMany() // Query the user table in the public schema const publicUsers = await prisma.public.user.findMany()
11 replies
PPrisma
Created by kmj on 3/28/2024 in #help-and-questions
multiSchema variable
Hello, It looks like this is a preview feature but I cant seem to get it working, any pointers? I have enabled it in my prisma.schema but the client wont let me access seperate schemas, it looks like the prisma db pull just renames if there is a clash
11 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
Definitely a bun related issue, reverted to pnpm and works fine
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
I have it running on 1.0.18 but now it doesnt panic it just does frontend-1 exited with code 0
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
actually seems like bun is still the old version there
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
Unfortunately still crashes
Attaching to frontend-1
frontend-1 | Listening on http://localhost:3000...
frontend-1 | ============================================================
frontend-1 | Bun v1.1.10 (5102a944) Linux x64 (baseline)
frontend-1 | Args: "bun" "run" "/app/output/server/index.mjs"
frontend-1 | Features: jsc Bun.stdin(2) http_server spawn
frontend-1 | Builtins: "bun:main" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:os" "node:path" "node:process" "node:stream" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "node:punycode"
frontend-1 | Elapsed: 9248ms | User: 522ms | Sys: 119ms
frontend-1 | RSS: 1.02GB | Peak: 0.15GB | Commit: 1.02GB | Faults: 589
frontend-1 |
frontend-1 | panic(main thread): Segmentation fault at address 0x4A0D0
frontend-1 | oh no: Bun has crashed. This indicates a bug in Bun, not your code.
frontend-1 |
frontend-1 | To send a redacted crash report to Bun's team,
frontend-1 | please file a GitHub issue using the link below:
frontend-1 |
frontend-1 | https://bun.report/1.1.10/Br15102a94AqgghI2/tkjEA2AgtwS
frontend-1 |
frontend-1 exited with code 0
Attaching to frontend-1
frontend-1 | Listening on http://localhost:3000...
frontend-1 | ============================================================
frontend-1 | Bun v1.1.10 (5102a944) Linux x64 (baseline)
frontend-1 | Args: "bun" "run" "/app/output/server/index.mjs"
frontend-1 | Features: jsc Bun.stdin(2) http_server spawn
frontend-1 | Builtins: "bun:main" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:os" "node:path" "node:process" "node:stream" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "node:punycode"
frontend-1 | Elapsed: 9248ms | User: 522ms | Sys: 119ms
frontend-1 | RSS: 1.02GB | Peak: 0.15GB | Commit: 1.02GB | Faults: 589
frontend-1 |
frontend-1 | panic(main thread): Segmentation fault at address 0x4A0D0
frontend-1 | oh no: Bun has crashed. This indicates a bug in Bun, not your code.
frontend-1 |
frontend-1 | To send a redacted crash report to Bun's team,
frontend-1 | please file a GitHub issue using the link below:
frontend-1 |
frontend-1 | https://bun.report/1.1.10/Br15102a94AqgghI2/tkjEA2AgtwS
frontend-1 |
frontend-1 exited with code 0
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
Do you know how to force this?
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
Thank you for your suggestion
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
I did try to update bun but not sure if I need to force it in my docker container? My container is as follows
# Base image with Node.js
FROM node:lts-slim AS base
WORKDIR /app
RUN apt-get update && apt-get install -y openssl
RUN npm i -g bun

# Install dependencies into temp directory
# This will cache them and speed up future builds
FROM base AS install
COPY package.json bun.lockb ./
COPY . .
RUN bun install --frozen-lockfile

# Copy project files into the image

# [Optional] tests & build
ENV NODE_ENV=production
RUN bun run build

# Copy production dependencies and source code into final image
FROM oven/bun:alpine AS runtime
WORKDIR /app

# Copy necessary files from the 'install' stage to the 'runtime' stage
# COPY --from=install /app/node_modules ./node_modules
COPY --from=install /app/.output ./output

# Set user and expose port
USER bun
EXPOSE 3000/tcp

# Run the app
ENTRYPOINT [ "sh", "-c", "bun run /app/output/server/index.mjs" ]
# Base image with Node.js
FROM node:lts-slim AS base
WORKDIR /app
RUN apt-get update && apt-get install -y openssl
RUN npm i -g bun

# Install dependencies into temp directory
# This will cache them and speed up future builds
FROM base AS install
COPY package.json bun.lockb ./
COPY . .
RUN bun install --frozen-lockfile

# Copy project files into the image

# [Optional] tests & build
ENV NODE_ENV=production
RUN bun run build

# Copy production dependencies and source code into final image
FROM oven/bun:alpine AS runtime
WORKDIR /app

# Copy necessary files from the 'install' stage to the 'runtime' stage
# COPY --from=install /app/node_modules ./node_modules
COPY --from=install /app/.output ./output

# Set user and expose port
USER bun
EXPOSE 3000/tcp

# Run the app
ENTRYPOINT [ "sh", "-c", "bun run /app/output/server/index.mjs" ]
22 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
I have since fixed the initialisation but now it seems any prisma calls are crashing my bun instance
frontend-1 | ============================================================
frontend-1 | Bun v1.1.10 (5102a944) Linux x64 (baseline)
frontend-1 | Args: "bun" "run" "/app/output/server/index.mjs"
frontend-1 | Features: jsc Bun.stdin(2) fetch(3) http_server spawn
frontend-1 | Builtins: "bun:main" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:os" "node:path" "node:process" "node:stream" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "node:punycode"
frontend-1 | Elapsed: 80704ms | User: 790ms | Sys: 148ms
frontend-1 | RSS: 0.94GB | Peak: 0.17GB | Commit: 0.94GB | Faults: 0
frontend-1 |
frontend-1 | panic(main thread): Segmentation fault at address 0x4A0D0
frontend-1 | oh no: Bun has crashed. This indicates a bug in Bun, not your code.
frontend-1 |
frontend-1 | To send a redacted crash report to Bun's team,
frontend-1 | please file a GitHub issue using the link below:
frontend-1 |
frontend-1 | https://bun.report/1.1.10/Br15102a94AqgihI2/tkjEA2AgtwS
frontend-1 |
frontend-1 exited with code 0
frontend-1 | ============================================================
frontend-1 | Bun v1.1.10 (5102a944) Linux x64 (baseline)
frontend-1 | Args: "bun" "run" "/app/output/server/index.mjs"
frontend-1 | Features: jsc Bun.stdin(2) fetch(3) http_server spawn
frontend-1 | Builtins: "bun:main" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:os" "node:path" "node:process" "node:stream" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "node:punycode"
frontend-1 | Elapsed: 80704ms | User: 790ms | Sys: 148ms
frontend-1 | RSS: 0.94GB | Peak: 0.17GB | Commit: 0.94GB | Faults: 0
frontend-1 |
frontend-1 | panic(main thread): Segmentation fault at address 0x4A0D0
frontend-1 | oh no: Bun has crashed. This indicates a bug in Bun, not your code.
frontend-1 |
frontend-1 | To send a redacted crash report to Bun's team,
frontend-1 | please file a GitHub issue using the link below:
frontend-1 |
frontend-1 | https://bun.report/1.1.10/Br15102a94AqgihI2/tkjEA2AgtwS
frontend-1 |
frontend-1 exited with code 0
22 replies
PPrisma
Created by bill92 on 5/22/2024 in #help-and-questions
`PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime` error
@bill92
7 replies
PPrisma
Created by bill92 on 5/22/2024 in #help-and-questions
`PrismaClientInitializationError: Prisma Client could not locate the Query Engine for runtime` error
did you find a resolution for this?
7 replies
PPrisma
Created by roobr on 5/27/2024 in #help-and-questions
Nuxt 3 - Prisma building production
@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again. In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report
@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again. In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report
This is what I get, I am running this in a docker container, should I have to make a change to the build process to include prisma schema?
22 replies
PPrisma
Created by roobr on 5/6/2024 in #help-and-questions
orderBy on a relation include
Hello Nurul, I would like to select a relationship and have the results ordered by a column list_order using the orderBy function. It seems you cannot use the orderby function on a include relationship
4 replies