Fright XO
Fright XO
Explore posts from servers
PPrisma
Created by Fright XO on 10/17/2024 in #help-and-questions
PRISMA_SKIP_POSTINSTALL_GENERATE is Not Skipping Generate on yarn install
The following is what is output:
3.612 ➤ YN0000: └ Completed in 1s 658ms
3.713 ➤ YN0000: ┌ Link step
4.353 ➤ YN0007: │ @nestjs/core@npm:10.3.9 [53e0f] must be built because it never has been before or the last one failed
4.354 ➤ YN0007: │ @prisma/engines@npm:5.11.0 must be built because it never has been before or the last one failed
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Thanks for installing nest
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Please consider donating to our open collective
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT to help us maintain this package.
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Number of contributors: 0
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Number of backers: 1067
4.896 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Annual budget: $152,254
4.896 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Current balance: $14,962
4.896 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT
4.905 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Become a partner: https://opencollective.com/nest/donate
4.906 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT
5.057 ➤ YN0007: │ prisma@npm:5.11.0 must be built because it never has been before or the last one failed
5.225 ➤ YN0007: │ @prisma/client@npm:5.11.0 [6b952] must be built because it never has been before or the last one failed
5.328 ➤ YN0007: │ prisma-client@workspace:packages/prisma-client must be built because it never has been before or the last one failed
6.338 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT Environment variables loaded from .env
6.342 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT Prisma schema loaded from prisma/schema.prisma
6.384 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT Datasource "db": SQL Server database
6.384 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT
6.484 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDERR Error: P1001: Can't reach database server at localhost:1433
6.484 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDERR
6.484 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDERR Please make sure your database server is running at localhost:1433. 1433`. p/xfs-63160ca8
6.630 ➤ YN0009: │ prisma-client@workspace:packages/prisma-client couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-63160ca8/build.log)
6.631 ➤ YN0000: └ Completed in 2s 917ms
6.733 ➤ YN0000: · Failed with errors in 5s 228ms
------ exit code: 1
failed to solve: process "/bin/sh -c YARN_CACHE_FOLDER=/root/.yarn3-cache yarn install" did not complete successfully: exit code: 1
3.612 ➤ YN0000: └ Completed in 1s 658ms
3.713 ➤ YN0000: ┌ Link step
4.353 ➤ YN0007: │ @nestjs/core@npm:10.3.9 [53e0f] must be built because it never has been before or the last one failed
4.354 ➤ YN0007: │ @prisma/engines@npm:5.11.0 must be built because it never has been before or the last one failed
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Thanks for installing nest
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Please consider donating to our open collective
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT to help us maintain this package.
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Number of contributors: 0
4.852 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Number of backers: 1067
4.896 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Annual budget: $152,254
4.896 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Current balance: $14,962
4.896 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT
4.905 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT Become a partner: https://opencollective.com/nest/donate
4.906 ➤ YN0000: │ @nestjs/core@npm:10.3.9 [53e0f] STDOUT
5.057 ➤ YN0007: │ prisma@npm:5.11.0 must be built because it never has been before or the last one failed
5.225 ➤ YN0007: │ @prisma/client@npm:5.11.0 [6b952] must be built because it never has been before or the last one failed
5.328 ➤ YN0007: │ prisma-client@workspace:packages/prisma-client must be built because it never has been before or the last one failed
6.338 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT Environment variables loaded from .env
6.342 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT Prisma schema loaded from prisma/schema.prisma
6.384 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT Datasource "db": SQL Server database
6.384 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDOUT
6.484 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDERR Error: P1001: Can't reach database server at localhost:1433
6.484 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDERR
6.484 ➤ YN0000: │ prisma-client@workspace:packages/prisma-client STDERR Please make sure your database server is running at localhost:1433. 1433`. p/xfs-63160ca8
6.630 ➤ YN0009: │ prisma-client@workspace:packages/prisma-client couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-63160ca8/build.log)
6.631 ➤ YN0000: └ Completed in 2s 917ms
6.733 ➤ YN0000: · Failed with errors in 5s 228ms
------ exit code: 1
failed to solve: process "/bin/sh -c YARN_CACHE_FOLDER=/root/.yarn3-cache yarn install" did not complete successfully: exit code: 1
6 replies
PPrisma
Created by Fright XO on 10/17/2024 in #help-and-questions
PRISMA_SKIP_POSTINSTALL_GENERATE is Not Skipping Generate on yarn install
The docker file is failing on the last command in this snipper:
#############################################################
# Stage 2 - App installation #
#############################################################

FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS app-installer

# Optimize for YARN installation speed
ENV YARN_ENABLE_GLOBAL_CACHE=false
ENV YARN_ENABLE_MIRROR=false
ENV YARN_NODE_LINKER=node-modules
ENV YARN_NM_MODE=hardlinks-local
ENV YARN_ENABLE_HARDENED_MODE=0

# Disable the Prisma postinstall hook to avoid generating code early
ENV PRISMA_SKIP_POSTINSTALL_GENERATE=true
ENV PRISMA_GENERATE_SKIP_AUTOINSTALL=true
ENV DEBUG=prisma:postinstall

WORKDIR /app

# Copy gitignore and JSON files to get dependencies first, since they change less often.
COPY --link .gitignore ./
COPY --from=app-builder --link /app/out/data/json/ .

# Use a cached volume for Yarn and skip building dependencies to optimize caching
RUN --mount=type=cache,target=/root/.yarn3-cache,id=yarn3-cache \
YARN_CACHE_FOLDER=/root/.yarn3-cache \
yarn install --mode=skip-build

# Get the full pruned source for the data project.
COPY --from=app-builder /app/out/data/full/ .
COPY --link tsconfig.json ./

# Install and build all dependencies.
RUN --mount=type=cache,target=/root/.yarn3-cache,id=yarn3-cache \
YARN_CACHE_FOLDER=/root/.yarn3-cache \
yarn install --inline-builds
#############################################################
# Stage 2 - App installation #
#############################################################

FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS app-installer

# Optimize for YARN installation speed
ENV YARN_ENABLE_GLOBAL_CACHE=false
ENV YARN_ENABLE_MIRROR=false
ENV YARN_NODE_LINKER=node-modules
ENV YARN_NM_MODE=hardlinks-local
ENV YARN_ENABLE_HARDENED_MODE=0

# Disable the Prisma postinstall hook to avoid generating code early
ENV PRISMA_SKIP_POSTINSTALL_GENERATE=true
ENV PRISMA_GENERATE_SKIP_AUTOINSTALL=true
ENV DEBUG=prisma:postinstall

WORKDIR /app

# Copy gitignore and JSON files to get dependencies first, since they change less often.
COPY --link .gitignore ./
COPY --from=app-builder --link /app/out/data/json/ .

# Use a cached volume for Yarn and skip building dependencies to optimize caching
RUN --mount=type=cache,target=/root/.yarn3-cache,id=yarn3-cache \
YARN_CACHE_FOLDER=/root/.yarn3-cache \
yarn install --mode=skip-build

# Get the full pruned source for the data project.
COPY --from=app-builder /app/out/data/full/ .
COPY --link tsconfig.json ./

# Install and build all dependencies.
RUN --mount=type=cache,target=/root/.yarn3-cache,id=yarn3-cache \
YARN_CACHE_FOLDER=/root/.yarn3-cache \
yarn install --inline-builds
6 replies
PPrisma
Created by Fright XO on 6/24/2024 in #help-and-questions
Best Practices for Updating Nested Relations in Prisma with NestJS and SQL Server
For the update, would you prefer PUT or PATCH? It looks to me like this code would be handling a PUT payload.
4 replies
CC#
Created by _poisson_ on 1/19/2023 in #help
✅ Why string are immutable?
Could there be confusion about the mutability between the type string and the value representation of a string? string s = "asd"; s ="dsa"; and "asd" = "dsa"? I ask because the question is marked as beginner.
21 replies
CC#
Created by Fright XO on 1/18/2023 in #help
✅ How to flush NLog on application exit with MEL
Nevermind, I've asked ChatGPT and it suggested that I dispose of the ILoggerFactory that I had created. By updating my creation logic to store and reuse a single ILoggerFactory, then calling the _loggerFactory.Dispose function from within my managing class's dispose function, I am seeing that it is now flushed. This was one case where some nudging of chatgpt and testing it's response actually helped.
3 replies
CC#
Created by Fright XO on 1/18/2023 in #help
✅ How to flush NLog on application exit with MEL
Bump, I'm still not sure the proper way to do this.
3 replies
CC#
Created by Fright XO on 1/12/2023 in #help
❔ ✅ DotNet Templating Bind Project Name
!!! you're awesome... i didn't know they also "bind" parameters... that worked :D
20 replies
CC#
Created by Fright XO on 1/12/2023 in #help
❔ ✅ DotNet Templating Bind Project Name
parameters are usually custom fields on the template generation, was my understanding... trying now
20 replies
CC#
Created by Fright XO on 1/12/2023 in #help
❔ ✅ DotNet Templating Bind Project Name
I can try again, maybe parameter of type "name" gets automatically assigned?
20 replies
CC#
Created by Fright XO on 1/12/2023 in #help
❔ ✅ DotNet Templating Bind Project Name
The users of that template get an additional field called "name" that gets a parameter though, right?
20 replies
CC#
Created by Fright XO on 1/12/2023 in #help
❔ ✅ DotNet Templating Bind Project Name
One option that exists may be to use the .vstemplate, i guess. https://learn.microsoft.com/en-us/visualstudio/ide/template-parameters?view=vs-2022 but i suspected all those replacement properties exist in this other templating
20 replies