Hi @sajjadmrx , I tried to launch the application, but it constantly fails due to a discord module error. I have no experience with js/ts, so I couldn't fix it myself. Could you write down how to fix it.
Here's what I tried (in order):
Added this line RUN npm install -D typescript@5.1 before COPY package.json .
Replaced the previous line with this one RUN npm install -D typescript@latest
Replaced the previous line with this one RUN npm install -D typescript@5.0
Replaced the original docker image with this one FROM node:18-alpine3.18
Replaced the original docker image with this one FROM node:16-alpine3.17 and removed the line from step three
None of this helped, the error is always the same:
Hi @sajjadmrx , I tried to launch the application, but it constantly fails due to a discord module error. I have no experience with js/ts, so I couldn't fix it myself. Could you write down how to fix it.
Here's what I tried (in order):
RUN npm install -D typescript@5.1
beforeCOPY package.json .
RUN npm install -D typescript@latest
RUN npm install -D typescript@5.0
FROM node:18-alpine3.18
FROM node:16-alpine3.17
and removed the line from step threeNone of this helped, the error is always the same:
full log
```js docker compose up [+] Running 1/1 ⠿ Container telegram_to_discord_gif-app-1 Recreated 0.1s Attaching to telegram_to_discord_gif-app-1 telegram_to_discord_gif-app-1 | telegram_to_discord_gif-app-1 | > telegram-to-discord-gifs@1.0.0 start telegram_to_discord_gif-app-1 | > tsc && node build/main.js telegram_to_discord_gif-app-1 | telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1181,21): error TS1139: Type parameter declaration expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1181,27): error TS1434: Unexpected keyword or identifier. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1181,29): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1182,9): error TS1005: ')' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1182,11): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1183,13): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1184,18): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1184,29): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1184,31): error TS1011: An element access expression should take an argument. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1185,3): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1185,4): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1196,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1196,21): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1196,29): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1197,9): error TS1005: ')' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1198,13): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1198,14): error TS1134: Variable declaration expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1199,17): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1199,18): error TS1134: Variable declaration expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1199,29): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1199,30): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1200,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1200,4): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1211,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1211,24): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1211,42): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1211,49): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1212,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1212,24): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1212,43): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1212,53): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1213,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1213,25): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1213,43): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1213,50): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1214,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1214,25): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1214,44): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1214,54): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1215,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1215,24): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1215,42): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1215,49): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1216,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1216,24): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1216,43): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1216,53): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1217,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1217,22): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1217,40): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1217,47): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1218,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1218,22): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1218,41): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1218,51): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1219,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1219,24): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1219,33): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1220,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1220,22): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1220,40): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1220,47): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1221,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1221,22): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1221,41): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1221,51): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1222,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1222,28): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1222,46): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1222,53): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1223,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1224,9): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1225,14): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1226,4): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1227,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1228,9): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1229,13): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1230,4): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1231,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1232,9): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1233,14): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1234,4): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1235,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1235,25): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1235,43): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1235,50): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1236,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1236,25): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1236,44): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1236,54): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1237,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1237,28): error TS1005: ',' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1237,35): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1238,3): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1238,29): error TS1109: Expression expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1238,39): error TS1005: ';' expected. telegram_to_discord_gif-app-1 | node_modules/discord.js/typings/index.d.ts(1239,1): error TS1128: Declaration or statement expected. telegram_to_discord_gif-app-1 exited with code 2 ```I found same issue, but this didn't help me: https://github.com/discordjs/discord.js/issues/9783
Thanks