Skip to content

构建前端报错! #56

@pailecheng

Description

@pailecheng

root@a43978702:/www/wwwroot/GridBNB-USDT/web# npm run build

[email protected] build
tsc -b && vite build

src/components/GlassCard.tsx:5:17 - error TS1484: 'CSSProperties' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

5 import React, { CSSProperties, ReactNode } from 'react';
~~~~~~~~~~~~~

src/components/GlassCard.tsx:5:32 - error TS1484: 'ReactNode' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

5 import React, { CSSProperties, ReactNode } from 'react';
~~~~~~~~~

src/components/ParticleBackground.tsx:19:28 - error TS2554: Expected 1 arguments, but got 0.

19 const animationFrameId = useRef();
~~~~~~

node_modules/@types/react/index.d.ts:1728:24
1728 function useRef(initialValue: T): RefObject;
~~~~~~~~~~~~~~~
An argument for 'initialValue' was not provided.

src/hooks/useSSE.ts:55:38 - error TS2503: Cannot find namespace 'NodeJS'.

55 const reconnectTimeoutRef = useRef<NodeJS.Timeout | null>(null);
~~~~~~

src/main.tsx:1:22 - error TS6133: 'useEffect' is declared but its value is never read.

1 import { StrictMode, useEffect } from 'react'
~~~~~~~~~

src/pages/Home/index.tsx:10:3 - error TS6133: 'Statistic' is declared but its value is never read.

10 Statistic,
~~~~~~~~~

src/pages/Home/index.tsx:15:3 - error TS6133: 'Badge' is declared but its value is never read.

15 Badge,
~~~~~

src/pages/Home/index.tsx:39:1 - error TS6133: 'ProCard' is declared but its value is never read.

39 import { ProCard } from '@ant-design/pro-components';


src/pages/Login/index.tsx:7:31 - error TS6133: 'Card' is declared but its value is never read.

7 import { Form, Input, Button, Card, Typography, message } from 'antd';
                             ~~~~

src/pages/Trades/index.tsx:25:3 - error TS6133: 'SearchOutlined' is declared but its value is never read.

25   SearchOutlined,
  ~~~~~~~~~~~~~~

src/routes/index.tsx:17:32 - error TS2307: Cannot find module '@/pages/Logs' or its corresponding type declarations.

17 const Logs = lazy(() => import('@/pages/Logs'));
                               ~~~~~~~~~~~~~~


Found 11 errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions