Skip to content

doesn't 'run build' as downloaded #166

Open

Description

@bigbadbrad

the error:
Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ..Failed to compile.

./src/components/dashboard/layout/mobile-nav.tsx:88:27
Type error: Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.

86 | <Divider sx={{ borderColor: 'var(--mui-palette-neutral-700)' }} />
87 | <Box component="nav" sx={{ flex: '1 1 auto', p: '12px' }}>

88 | {renderNavItems({ pathname, items: navItems })}
| ^
89 |
90 | <Divider sx={{ borderColor: 'var(--mui-palette-neutral-700)' }} />
91 | <Stack spacing={2} sx={{ p: '12px' }}>

Activity

  1. Abmstpha commented on Jun 24, 2024

    @Abmstpha

    $ npm run build

    material-kit-react@4.0.0 build
    next build

    ▲ Next.js 14.1.3

    Creating an optimized production build ...
    ✓ Compiled successfully
    Linting and checking validity of types ...

    Failed to compile.

    ./src/components/core/logo.tsx
    52:44 Error: Invalid type "number" of template literal expression. @typescript-eslint/restrict-template-expressions
    52:66 Error: Invalid type "number" of template literal expression. @typescript-eslint/restrict-template-expressions

    ./src/components/dashboard/overview/sales.tsx
    75:47 Error: Invalid type "number" of template literal expression. @typescript-eslint/restrict-template-expressions
    75:61 Error: Invalid type "number" of template literal expression. @typescript-eslint/restrict-template-expressions

    ./src/contexts/user-context.tsx
    47:27 Error: Prefer the safe : unknown for a catch callback variable. @typescript-eslint/use-unknown-in-catch-callback-variable

    info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules

  2. acomanescu commented on Jun 26, 2024

    @acomanescu
    Contributor

    Hi @Abmstpha , I've pushed the fixed.

    Regarding @bigbadbrad I'm not sure why you get that error because useNavigation always returns a pathname that's always a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions