When I run the site locally using
netlify dev, it works fine, however, when deployed to Netlify, certain assets are missing. If I go to
shortkurt.netlify.app/.netlify/functions/get-classes it redirects me to 404 page, indicating that the serverless function is missing too.
While looking for a solution, I came across this article which said that this problem could be due to using camelcase convention for file names. So I refactored the function
get-classes.js. Sadly, that didn’t solve the issue. All my other files are single-named files so they’re all in lowercase only. I can’t get a hang of what the issue is.
Also, I think it’s worth mentioning this: In the
get-classes.js file, I am using XMLHttpResponse to make the GET request. Its documentation says that it is to be imported like so:
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest. I am aware this is camelcase, but I can’t really change it because that is how it’s supposed to be imported.
Hoping to get a response from the lovely community over at Netlify. Thank you in anticipation!