-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Programmatic usage breaks when upgrading from v2.4 to v2.5 #5408
Comments
Had the same issue. It is running express. This minor version upgrade broke our prod. fun thing it is working on dev and it is working if it is built using the builder in node, but not npm run build. We switched from express to nuxt server for the time being, but I am assuming I know the issue. https://github.com/nuxt/nuxt.js/releases/tag/v2.5.0
This breaks all existing express servers. |
@Gedminas It is no breaking change as stated in the release notes. Awaiting until nuxt is actually ready should always have happened when using Nuxt programmatically. |
We had the same issue, including running in dev mode but not in prod. Solved by downgrading nuxt-cli to 2.4.5 our package-lock.json:
|
I can confirm this was a breaking change for some programmatic users. This will be reverted back in 2.6. |
@pi0 just curious about the revert. I already upgraded and just followed the additional |
From #5413 |
Same issue with me as well. Trying get rid of this error from past 3 days but still could not find any solutions |
@prakashbharti786 Did you also added /PS 2.6 will be released today or tomorrow |
@pi0 i added that after reading all comments here and it is working fine now. Thank you so much for your reply. |
Any reason a change like that doesn't make it into the CHANGELOG file? The release notes seem pretty clear - but I missed them since the changelog doesn't indicate that there's anything more to the release than what's mentioned there. |
After I upgraded from 2.4.6 ( As far as I understand, calling My
As is my lambda handler:
|
@lukaVarga The problem should not be related to ready. Do you manually use |
@pi0 @lukaVarga we had the exact same issue when upgrading from 2.4.x. We didn't find that 2.6.1 helped with the issue. We had almost the same nuxt.js and lambda handler. We aren't using typescript. What worked for us was to change nuxt.js to an async function so that we could call So nuxt.js became
Then changed our lambda handler using this approach https://stackoverflow.com/a/47851485
|
@chriswilcox-mof you, sir, are a life saver! Thanks a lot, this solution works perfectly! |
Was also getting this issue after a clean install and upgrade, async handler fixed it. But before I was able to store variable in lambda and it would stay in memory for the next call. now this behavior seems to have changed. wondering what was happening before that gave this lambda advantage. I have this middleware db.js that's using an S3 client lib
in the S3 client library I store the result into a global variable, and check if it's available in the next call, then avoid download the S3 file again
with this the S3 file would first take 2000ms to download, then in the next call it took 1ms, taking the items from memory. now with this new method for initializing nuxt and the latest version of libraries such as esm, this effect does not happen anymore, the cache variable is always starting null. apparently before it was only running the module.exports method in each call, but globals only once. now it seems to run globals and module.exports methods entirely every call. this is probably not related to the change in nuxt, but something from esm, in any case I thought it was interesting how we can have long lived memory in Lambda. does anyone know if we can store data in say process.env or other cross-call object? |
@chriswilcox-mof Great solution, I received timeouts so I guessed it is now mandatory for lambda to return something so I just added return before calling nuxt() and it works like a charm. Thanks! |
Thank a lot to @chriswilcox-mof and @phpoenix you save my life. Great ! |
Just for info:
is also possible. |
@thomas4Bitcraft thanks for this! I can confirm as of today, this is the only solution that worked for me! |
Version
v2.5.1
Reproduction link
http://donthaveone.com
Steps to reproduce
Deploy Nuxt application using v2.4 to lambda function with express.
Based on https://github.com/serverless/examples/tree/master/aws-node-vue-nuxt-ssr
What is expected ?
Application should function normally.
What is actually happening?
After upgrading to v2.5.1 express always returns a "cannot GET /" message.
The text was updated successfully, but these errors were encountered: