Ferks-FK / Pterodactyl-AutoThemes

Themes Installation Script for Pterodactyl 0.7 and 1.x
MIT License
82 stars 39 forks source link

Error #3

Closed Atharv-Pathak-14 closed 3 years ago

Atharv-Pathak-14 commented 3 years ago

Tried installing theme but got error Os - Debain 10

ERROR in resources/scripts/components/elements/AceEditor.tsx:2:23
TS2307: Cannot find module 'use-react-router' or its corresponding type declarations.
    1 | import React, { useCallback, useEffect, useState, lazy } from 'react';
  > 2 | import useRouter from 'use-react-router';
      |                       ^^^^^^^^^^^^^^^^^^
    3 | import { ServerContext } from '@/state/server';
    4 | import ace, { Editor } from 'brace';
    5 | import getFileContents from '@/api/server/files/getFileContents';

ERROR in resources/scripts/components/elements/AceEditor.tsx:4:29
TS2307: Cannot find module 'brace' or its corresponding type declarations.
    2 | import useRouter from 'use-react-router';
    3 | import { ServerContext } from '@/state/server';
  > 4 | import ace, { Editor } from 'brace';
      |                             ^^^^^^^
    5 | import getFileContents from '@/api/server/files/getFileContents';
    6 | import styled from 'styled-components';
    7 | 

ERROR in resources/scripts/components/elements/SuspenseSpinner.tsx:8:42
TS2322: Type '"normal"' is not assignable to type 'SpinnerSize | undefined'.
     6 |         fallback={
     7 |             <div className={'mx-4 w-3/4 mr-4 flex items-center justify-center'}>
  >  8 |                 <Spinner centered={true} size={'normal'}/>
       |                                          ^^^^
     9 |             </div>
    10 |         }
    11 |     >

ERROR in resources/scripts/plugins/useDeepMemo.ts:2:21
TS7016: Could not find a declaration file for module 'lodash-es/isEqual'. '/var/www/pterodactyl/node_modules/lodash-es/isEqual.js' implicitly has an 'any' type.  Try `npm i --save-dev @types/lodash-es` if it exists or add a new declaration (.d.ts) file containing `declare module 'lodash-es/isEqual';`
    1 | import { useRef } from 'react';
  > 2 | import isEqual from 'lodash-es/isEqual';
      |                     ^^^^^^^^^^^^^^^^^^^
    3 | 
    4 | export const useDeepMemo = <T, K> (fn: () => T, key: K): T => {
    5 |     const ref = useRef<{ key: K, value: T }>();

ERROR in resources/scripts/plugins/useServer.ts:6:69
TS2345: Argument of type '(DependencyList | undefined)[]' is not assignable to parameter of type '(prev: Server, next: Server) => boolean'.
  Type '(DependencyList | undefined)[]' provides no match for the signature '(prev: Server, next: Server): boolean'.
    4 | 
    5 | const useServer = (dependencies?: DependencyList): Server => {
  > 6 |     return ServerContext.useStoreState(state => state.server.data!, [ dependencies ]);
      |                                                                     ^^^^^^^^^^^^^^^^
    7 | };
    8 | 
    9 | export default useServer;
error Command failed with exit code 2.                                          info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Atharv-Pathak-14 commented 3 years ago

Contacting on Discord