nuxt-on-lambda icon indicating copy to clipboard operation
nuxt-on-lambda copied to clipboard

Http request from deployed app with axios

Open tomasSlouka opened this issue 4 years ago • 2 comments

Hello again. I have a problem with making requests with Axios from the server-side before the content is sent and rendered on the client-side to my API.

According to this thread > https://github.com/nuxt-community/auth-module/issues/478, the problem is that Nodejs does not accept responses from the API, but there is not an error in the logs. Didn't you encounter something similar?

tomasSlouka avatar May 25 '20 19:05 tomasSlouka

  • from logs in lambda console I can see "FATAL Enable vuex store by creating store/index.js." that can also cause some problems :(. I'm helpless.

tomasSlouka avatar May 25 '20 20:05 tomasSlouka

Hello, it's been a long time. I've been running Nuxt.js for a few years and have never encountered such a problem.

Nuxt.js is limited to those areas where asynchronous processing can be performed. It's asyncData, fetch, Plugin, and Middleware. And need to return Promise. Other than these, Nuxt.js will not wait for asynchronous processing. created and so on are executed. But these are not waiting.

mya-ake avatar May 26 '20 12:05 mya-ake