Personal-Portfolio-template icon indicating copy to clipboard operation
Personal-Portfolio-template copied to clipboard

Error importing prism-react-renderer themes in About.tsx file

Open ifulxploit opened this issue 1 year ago • 0 comments

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:

  1. Clone the repository from here.
  2. Navigate to the project directory.
  3. Run pnpm install to install dependencies.
  4. Run pnpm run dev to start the development server.
  5. Open localhost:3000 in a web browser.
  6. 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 Screenshot (158)

[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.

ifulxploit avatar Feb 14 '24 07:02 ifulxploit