Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

A problem while trying to run (exit code: 2) #495

@DevourGA

Description

@DevourGA

A problem while trying to run (exit code: 2)

#13 101.6
#13 101.6 > api
 
#13 101.9 yarn run v1.22.19
 
#13 102.0 $ prisma generate
 
#13 102.6 Prisma schema loaded from prisma/schema.prisma
 
#13 103.2
#13 103.2 ✔ Generated Prisma Client (4.16.2 | library) to ./../node_modules/@prisma/client in 154ms
#13 103.2 You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
#13 103.2 ```
#13 103.2 import { PrismaClient } from '@prisma/client'
#13 103.2 const prisma = new PrismaClient()
#13 103.2 ```
#13 103.3 $ rimraf dist && eslint -c .eslintrc.js --ext .ts . && tsc
 
#13 108.8 ../node_modules/@prisma/client/runtime/index.d.ts(2992,182): error TS1005: '?' expected.
#13 108.9 error Command failed with exit code 2.
#13 108.9 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#13 108.9 error Command failed.
#13 108.9 Exit code: 2
#13 108.9 Command: /usr/local/bin/node
#13 108.9 Arguments: /opt/yarn-v1.22.19/lib/cli.js run build
#13 108.9 Directory: /api
#13 108.9 Output:
#13 108.9
 
#13 108.9 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command.
#13 ERROR: process "/bin/sh -c yarn workspaces run build" did not complete successfully: exit code: 2
 
-----
> [ 9/10] RUN yarn workspaces run build:
#13 108.9 error Command failed with exit code 2.
#13 108.9 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#13 108.9 error Command failed.
#13 108.9 Exit code: 2
#13 108.9 Command: /usr/local/bin/node
#13 108.9 Arguments: /opt/yarn-v1.22.19/lib/cli.js run build
#13 108.9 Directory: /api
#13 108.9 Output:
#13 108.9
#13 108.9 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command.
-----
 
Dockerfile:26
-------------------
24 |     RUN yarn install --network-timeout 1000000
25 |     COPY . .
26 | >>> RUN yarn workspaces run build
27 |     RUN yarn server prisma migrate deploy
28 |
-------------------
ERROR: failed to solve: process "/bin/sh -c yarn workspaces run build" did not complete successfully: exit code: 2

Use in a service: railway
I canceled the project more than once to no avail, and I also tried to restart it at intervals to no avail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions