-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
baseURL is undefined on some pages and logs show "Error: connect ECONNREFUSED 127.0.0.1:80" #438
Comments
I had the same problem, it doesn't make sense but I have come up with a simple solution :) I've created plugins/axios.js
For example when you send Axios request to "categories/list" it will be "https://domain.com/categories/list" I know it is simple but now it's working 😄 |
Hey, |
You can use workaround from @OFK0 |
this helped me in package.json
|
Nuxt version 2.14.7
Axios module 5.12.2
Problem: (Occurring only in production)
asyncData
on a page with middleware and directory structure/dirName/fileName.vue
, the request goes to correct baseURL./dirName/_id/index.vue
the error is shown as in the titleprocess.env.SOME_VARIABLE
does not work on the previous situationCode sample
Page
/inspirations/_id/index.vue
Things I have tried:
into
Nothing changed. The only fix I have now is to hard code the baseURL
The text was updated successfully, but these errors were encountered: