Skip to main content

Pterodactyl v1.X

ERROR in resources/scripts/components/server/settings/RenameServerBox.tsx

RarityDifficulty Pterodactyl Version
Uncommon★☆☆☆☆ 1.X

What is the cause of this error?

Exemple:

ERROR in resources/scripts/components/server/settings/RenameServerBox.tsx:66:17
TS2322: Type 'string | null' is not assignable to type 'string'.
  Type 'null' is not assignable to type 'string'.
    64 |             initialValues={{
    65 |                 name: server.name,
  > 66 |                 description: server.description,
       |                 ^^^^^^^^^^^
    67 |             }}
    68 |             validationSchema={object().shape({
    69 |                 name: string().required().min(1),
error Command failed with exit code 2.

How can you resolve this issue?

To effectively rectify this issue, please adhere to the following steps. It is a straightforward process that involves accessing the RenameServerBox.tsx file located within the resources/scripts/components/server/settings directory of your Pterodactyl panel and replace:

description: string;

By:

description: any;

Afterward, you just need to execute yarn build:production, and the problem will be resolved.