-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
Question - Plans for next v9 #101
Comments
Hello! Sorry, been very busy lately but definitely Next 9 support will be coming. Find the Dynamic Routing Proposal here: #105. API Routes and Automatic Static Optimisation is also really cool stuff I'll be creating some proposals for over the next few weeks 👍 |
Is Next v9 compatible with the current version of this plugin? Even if all features aren't supported yet. |
It's probably not compatible, although I haven't tried it. |
Not compatible. I just tried it :) |
Raised another RFC for automatic static optimisation, #107 |
UPDATE: I should clarify that I managed to get this working Next v9 without much effort. I got an error earlier but it was due to misconfiguration on my part. I haven't got dynamic routing in my project - I don't think it will work out of the box as discussed in this thread. |
@aygee How did you get it working? I get the following error
|
@jishaal I also had that error before but managed to get rid of it eventually after trying few different things, but I don't know what fixed it. What is your version of serverless? Mine is 1.41.1. Did you use yarn or npm? (I used yarn) maybe try to delete node_modules folder and do another |
Adding the below to custom:
serverless-nextjs: {} Manages to push the stack out to AWS now, but having issues when hitting the endpoints, I am guessing because it cannot handle the static html files with Automatic Static Optimization? I need to investigate further, would love to somehow get it working! |
@jishaal good point, I think it's expecting that key in the For static files, they need to be hosted somewhere else, because aws lambda won't be able to serve the static files. You can follow the instruction how to host the static files in s3: https://github.com/danielcondemarin/serverless-nextjs-plugin#hosting-static-assets |
Hmm I got this and I believe this is working fine for things like images/script etc for me ie. bucket gets created and these files end up there. What I think the issue is that due to Automatic Static Optimization, if a route does not have
https://github.com/zeit/next.js/#automatic-prerendering Currently the lambda gets uploaded the html file and a weird related js file and its all falls apart // index.html
const page = require("./index.html.original.js");
const handlerFactory = require("next-aws-lambda");
module.exports.render = (event, context, callback) => {
const handler = handlerFactory(page);
handler(event, context, callback);
}; and the file it references
|
FYI I got around this by adding a noop e.g. |
I missed this thread, but raised one for API Routes over at #116 |
@mattdell what version of next@8 does it support api routes? I'm trying to upload latest |
@johhansantana Have you checked your server log? |
@aygee I think it's this error |
@johhansantana read through #123 as I had the exact same problem You need
|
Got it! The only problem now are the assets aren't being loaded because of the url stage suffix. I guess this is fixed when you put your custom domain? |
I have recently released https://github.com/danielcondemarin/serverless-next.js/tree/master/packages/serverless-nextjs-component which targets |
Hello !
What is you plan about :
These are great improvements in the next environment ! I don't know what is your vision @danielcondemarin on this and how this plugin should handle theses features/improvements.
Thanks.
The text was updated successfully, but these errors were encountered: