My site URL: https://test--benevolent-licorice-2c20eb.netlify.app/
I have deployed my React weather app to Netlify, but all I’m seeing on the site is a blank page with this error in the console:
Uncaught TypeError: Failed to resolve module specifier “react”. Relative references must start with either “/”, “./”, or “…/”.
For extra reference, I’ve also gotten these errors below upon first loading the page, but they disappeared when I refreshed. However, the above error still remains.
I’m using my GitHub repository to deploy the site, via my “test” branch. As you will see, the package.json
file is located in the root directory, so I don’t understand why it’s not recognizing the file.
Here are my build settings:
Runtime: Not set
Base directory: .
Package directory: Not set
Build command: vite build
Publish directory: ./build/
Functions directory: ./netlify/functions
Deploy log visibility: Logs are public
Build status: Active
At first, I had the base directory field empty, but I added a period for more specification. That didn’t seem to have any impact, though. The build command was also “npm run build”, but I changed it to “vite build” to see if that would help. It didn’t.
If anyone notices any other problems with my site or repository besides what’s causing the error, please let me know.