Getting 404 Not Found in certain APIs in the application. #6569
Replies: 4 comments 4 replies
-
As songs folder is a static folder, therefore I have provided the path in the vercel.json but it is still unable to load. Can someone help to resolve the issue. It would be really helpful. |
Beta Was this translation helpful? Give feedback.
-
{ |
Beta Was this translation helpful? Give feedback.
-
{ try adjusting the path accordingly it may help you load the CSS and script @shikharbajpai |
Beta Was this translation helpful? Give feedback.
-
@SarikAnwar01 with these changes, html css and script are laoding, but my issue is that the /songs and /songs/freemusic folder are not loading. The code for that is written in script.js. Locally it is working. Can you help me with this Here is the updated vercel.json for that. |
Beta Was this translation helpful? Give feedback.
-
Summary
Application link: https://music-player-gxka.vercel.app/
GitHub repo link: https://github.com/shikharbajpai/music-player
It is a music application in which there is a songs directory which contains songs folder. But it is unable to load in the vercel. Locally the application is working. Not sure about the reason.
This is the updated vercel.json
{
"version": 2,
"name": "music-player",
"public": true,
"routes": [
{ "src": "/(.)", "dest": "/$1.html" },
{ "src": "/songs/(.)", "dest": "/songs/$1" },
{ "src": "/songs/freemusic/(.*)", "dest": "/songs/freemusic/$1" },
{ "src": "/songs/freemusic/Hazy After Hours.mp3", "dest": "/songs/freemusic/Hazy%20After%20Hours.mp3" }
]
}
Example
https://music-player-gxka.vercel.app/songs/freemusic/
Steps to Reproduce
Open the application link: https://music-player-gxka.vercel.app/
In the developers tools (Fn+ F12) these Api's are giving 404 error: https://music-player-gxka.vercel.app/songs/freemusic/ and https://music-player-gxka.vercel.app/songs/
Due to this neither albums nor any song in the library section is getting loaded.
Beta Was this translation helpful? Give feedback.
All reactions