Pterodactyl v1.X
ERROR in resources/scripts/routers/routes.ts
Rarity: Uncommon | Difficulty : ★☆☆☆☆ | Pterodactyl Version : 1.X |
What is this error?
Sometime you can have this error during the compilation of a Pterodactyl panel. The most of time this happend after a modification that can came from a addon or a theme.
Exemple:
ERROR in resources/scripts/routers/routes.ts:39:5
TS2300: Duplicate identifier 'nestId'.
37 | interface ServerRouteDefinition extends RouteDefinition {
38 | permission: string | string[] | null;
39 | nestId?: number;
| ^^^^^^
40 | eggId?: number;
41 | nestIds?: number[];
42 | eggIds?: number[];ERROR in resources/scripts/routers/routes.ts:40:5
TS2300: Duplicate identifier 'eggId'.
38 | permission: string | string[] | null;
39 | nestId?: number;
40 | eggId?: number;
| ^^^^^
41 | nestIds?: number[];
42 | eggIds?: number[];
43 | nestId?: number;ERROR in resources/scripts/routers/routes.ts:41:5
TS2300: Duplicate identifier 'nestIds'.
39 | nestId?: number;
40 | eggId?: number;
41 | nestIds?: number[];
| ^^^^^^^
42 | eggIds?: number[];
43 | nestId?: number;
44 | eggId?: number;ERROR in resources/scripts/routers/routes.ts:42:5
TS2300: Duplicate identifier 'eggIds'.
40 | eggId?: number;
41 | nestIds?: number[];
42 | eggIds?: number[];
| ^^^^^^
43 | nestId?: number;
44 | eggId?: number;
45 | nestIds?: number[];
How to resolve it
For resolve it this is not hard you just need to open with a text editor the routes.ts located in the resources/scripts/routers folder of your Pterodactyl panel and find something like this:
nestId: number;
eggId: number;
nestIds: number[];
eggIds: number[];
nestId: number;
eggId: number;
nestIds: number[];
eggIds: number[];
To something like this:
nestId: number;
eggId: number;
nestIds: number[];
eggIds: number[];
After you just need to run a yarn build:production
and the problem are going to be resolved.