Personal-Portfolio-template
Personal-Portfolio-template copied to clipboard
Error importing prism-react-renderer themes in About.tsx file
Bug Report
Describe the bug
Upon running the project locally after cloning the repository and installing dependencies, an error occurred related to importing prism-react-renderer
themes in the About.tsx
file.
To Reproduce Steps to reproduce the behavior:
- Clone the repository from here.
- Navigate to the project directory.
- Run
pnpm install
to install dependencies. - Run
pnpm run dev
to start the development server. - Open
localhost:3000
in a web browser. - Observe the error message displayed on the screen.
Expected behavior The project should run without any errors, and the page should load correctly without any import-related issues.
Screenshots
[plugin:vite:import-analysis] Failed to resolve import "prism-react-renderer/themes/github" from "src\components\About.tsx". Does the file exist?
D:/React-project/Personal-Portfolio-template/src/components/About.tsx:14:19
15 | import { Container, Group, Switch, Text, Title, useMantineTheme } from "@mantine/core";
16 | //
17 | import github from "prism-react-renderer/themes/github";
| ^
18 | import vsDark from "prism-react-renderer/themes/vsDark";
19 | // Components
Desktop Environment
- OS: Windows 11 Home Single Language
- Browser: Google Chrome
- Version: Version 121.0.6167.161 (Official Build) (64-bit)
Additional context
The error seems to stem from the inability to resolve imports for prism-react-renderer
themes (github
and vsDark
) in the About.tsx
file. This issue occurred while using Visual Studio Code as the code editor.
Please review and address this issue at your earliest convenience. Let me know if any further information is required to assist in resolving this bug.
Thank you.