Skip to content

Module not found: Can't resolve 'react-syntax-highlighter/dist/esm/styles/prism' #134

@panditj24

Description

@panditj24

Error Type

Build Error

Error Message

Module not found: Can't resolve 'react-syntax-highlighter/dist/esm/styles/prism'

Build Output

./app/generation/page.tsx:11:1
Module not found: Can't resolve 'react-syntax-highlighter/dist/esm/styles/prism'
9 | import { HeaderProvider } from '@/components/shared/header/HeaderContext';
10 | import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';

11 | import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 | // Import icons from centralized module to avoid Turbopack chunk issues
13 | import {
14 | FiFile,

Import traces:
Client Component Browser:
./app/generation/page.tsx [Client Component Browser]
./app/generation/page.tsx [Server Component]

Client Component SSR:
./app/generation/page.tsx [Client Component SSR]
./app/generation/page.tsx [Server Component]

https://nextjs.org/docs/messages/module-not-found

Next.js version: 15.5.3 (Turbopack)

GET /generation 500 in 4422ms
⨯ ./app/generation/page.tsx:11:1
Module not found: Can't resolve 'react-syntax-highlighter/dist/esm/styles/prism'
9 | import { HeaderProvider } from '@/components/shared/header/HeaderContext';
10 | import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';

11 | import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 | // Import icons from centralized module to avoid Turbopack chunk issues
13 | import {
14 | FiFile,

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