mgilangjanuar / teledrive

The Google Drive/OneDrive/etc alternative using Telegram API

Home Page:https://teledriveapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

DevourGA opened this issue · comments

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.

im facing same problem when deploying on fly.io

same problem.

#0 118.6 > api
#0 119.4 yarn run v1.22.19
#0 119.5 $ prisma generate
#0 120.6 Prisma schema loaded from prisma/schema.prisma
#0 122.1
#0 122.1 ✔ Generated Prisma Client (4.16.2 | library) to ./../node_modules/@prisma/client in 171ms
#0 122.1 You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
#0 122.1 #0 122.1 import { PrismaClient } from '@prisma/client' #0 122.1 const prisma = new PrismaClient() #0 122.1
#0 122.1 $ rimraf dist && eslint -c .eslintrc.js --ext .ts . && tsc
#0 130.3 ../node_modules/@prisma/client/runtime/index.d.ts(2992,182): error TS1005: '?' expected.
#0 130.3 error Command failed with exit code 2.
#0 130.3 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#0 130.4 error Command failed.
#0 130.4 Exit code: 2
#0 130.4 Command: /usr/local/bin/node
#0 130.4 Arguments: /opt/yarn-v1.22.19/lib/cli.js run build
#0 130.4 Directory: /apps/api
#0 130.4 Output:
#0 130.4
#0 130.4 info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command.


same problem with staging branch as well as v.2.5.5

There is a problem with the latest version of Prisma and @Prisma/client packages (version 4.16.2) affecting all versions of Teledrive.
For a temporary fix, downgrade those packages by editing the following lines in the api/package.json file:
"@prisma/client": "^4.12.0" --> "@prisma/client": "4.16.1"
"prisma": "^4.12.0" --> "prisma": "4.16.1"

There is a problem with the latest version of Prisma and @Prisma/client packages (version 4.16.2) affecting all versions of Teledrive. For a temporary fix, downgrade those packages by editing the following lines in the api/package.json file: "@prisma/client": "^4.12.0" --> "@prisma/client": "4.16.1" "prisma": "^4.12.0" --> "prisma": "4.16.1"

its work. but i facing new error. cant login or generate qr code

commented

The database isn't being installed on the docker. I had to do it manually from psql inside the container. I had the database from an install from the past on my computer

There is a problem with the latest version of Prisma and @Prisma/client packages (version 4.16.2) affecting all versions of Teledrive. For a temporary fix, downgrade those packages by editing the following lines in the api/package.json file: "@prisma/client": "^4.12.0" --> "@prisma/client": "4.16.1" "prisma": "^4.12.0" --> "prisma": "4.16.1"

He worked with me this solution, thanks ^ ^

But a problem has appeared in trying to raise the previous database, every time I try (importing data) the page turns into a black screen, and (less than 1 %) of the database is raised.
Is there a solution to this problem?

The database isn't being installed on the docker. I had to do it manually from psql inside the container. I had the database from an install from the past on my computer

If you can find a way to solve the problem I mentioned earlier, I hope you tell me that.

After looking for many ways to solve the problem, I found one.
Just change the version of typescript "^4.4.2" to "^4.1.5" in api/package.json

After looking for many ways to solve the problem, I found one. Just change the version of typescript "^4.4.2" to "^4.1.5" in api/package.json

is it fixed cant login error too?

There is a problem with the latest version of Prisma and @Prisma/client packages (version 4.16.2) affecting all versions of Teledrive. For a temporary fix, downgrade those packages by editing the following lines in the api/package.json file: "@prisma/client": "^4.12.0" --> "@prisma/client": "4.16.1" "prisma": "^4.12.0" --> "prisma": "4.16.1"

Sadly as i already told to Wither this fix does not work when you are trying to host teledrive on sites like render.com fly etc. It gives an infinite loading also called runtime error. If someone has found a fix to this too, i would like to know.

if you host on heroku its will success deployed. but you will notice other problem. cant login or create user.

if you host on heroku its will success deployed. but you will notice other problem. cant login or create user.

Well it deploys successfully on my hosts too. Tho i have a runtime error. Keep in mind that i am using Dockerfile since i do not have access to a Shell

After looking for many ways to solve the problem, I found one. Just change the version of typescript "^4.4.2" to "^4.1.5" in api/package.json

This works for me, I have used railway for deployment.
Thanks a lot.

**蒂南海姆霍 ** 评论 2023 年 7 月 9 日

it work for me
thanks a lot