I typed "npm run dev" to run the application but I got this error: "Unable to load url /src/main.jsx (resolved id: /src/main.jsx). Does the file exist?" and the page is white. Code written in main.jsx:
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App/>
</React.StrictMode>,
)
I need quick help, thank you
I tried restarting VS Code and the server but it didn't work I tried "npm i" but it didn't work either
I encountered the exact same error because my project path was too long.
The path of my project is
C:\Users\User\Documents\1 My Projects\C#\Complex\MyAwesomeProject API_REACT_DOCKER\ProfileWebAppI moved the project to
C:\Users\User\Documents\MyAwesomeProjectIt solves this problem.