Bad URL Lambda functions / ERR_CONNECTION_REFUSED

Hello,

I’m getting a net::ERR_CONNECTION_REFUSED error when hitting a specific page of my Vue app. The catch block of the code below returns: Error in itemsList: Network Error.
This is because it is making a GET request to http://localhost:3000/.netlify/functions/getinstruments instead of /.netlify/functions/getinstruments for some strange reasons and I can’t figure how to remove the http://localhost:3000 part of the url.

How can I fix this? Thank you

My code is:

created () {
  this.$axios.get('/.netlify/functions/getinstruments')
    .then(data => {
      console.log(data)
    })
    .catch(err => {
      console.log('Error in itemsList: ' + err)
  })
}

Hi, have you checked if your code in production has an absolute URL instead of the relative path? I use axios and I know it respects relative paths. What’s the URL for the site that you have this deployed on?