mgilangjanuar / teledrive

The Google Drive/OneDrive/etc alternative using Telegram API
https://teledriveapp.com
GNU General Public License v3.0
2.06k stars 949 forks source link

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

Open DevourGA opened 1 year ago

DevourGA commented 1 year ago

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.

zYxDevs commented 1 year ago

im facing same problem when deploying on fly.io

tienanhemho commented 1 year ago

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.


sid8840 commented 1 year ago

same problem with staging branch as well as v.2.5.5

WitherTick commented 1 year ago

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"

zYxDevs commented 1 year ago

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

mdznf commented 1 year ago

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

DevourGA commented 1 year ago

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.

tienanhemho commented 1 year ago

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

zYxDevs commented 1 year ago

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?

tienanhemho commented 1 year ago

not sure, but you can try. For me, it working normaly

Vào CN, 9 thg 7, 2023 vào lúc 12:38 Yoga Pranata @.***> đã viết:

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?

— Reply to this email directly, view it on GitHub https://github.com/mgilangjanuar/teledrive/issues/495#issuecomment-1627612549, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACY2VTBOKZ67YXBJIHFBDE3XPI7VRANCNFSM6AAAAAAZ2RWLKI . You are receiving this because you commented.Message ID: @.***>

ErMythus commented 1 year ago

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.

zYxDevs commented 1 year ago

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

ErMythus commented 1 year ago

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

oracularzebra commented 1 year ago

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.

chaojixiaoyao commented 1 year ago

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

it work for me thanks a lot