Can you try cloning the repo and deploying it? If that works, there has to be a strange issue somewhere in your code. Compare your project to the cloned repo. Hopefully, that'll help you out. :)
I’m a full stack engineer working at Numu, in charge of developing web and mobile apps, handling AWS applications and devOps tasks. I may also write sporadically about my technical adventures.
FWIW, you're probably seeing issue from not deploying with custom domain and needing to have the stage in the path to access the resource, e.g. https://XXXXX.execute-api.us-east-1.amazonaws.com/production/_next/static/YYYYY/pages/index.js is needed but https://XXXXX.execute-api.us-east-1.amazonaws.com/_next/static/YYYYY/pages/index.js is what the express response actually renders.
Hi,
Once I deploy this, I'm able to load the front page, but all the next resources (*.js) come back as 403, any idea why?
Thanks for your help,
Hi,
I have exactly the same issue.
Where you able to solve it?
Thanks
Can you try cloning the repo and deploying it? If that works, there has to be a strange issue somewhere in your code. Compare your project to the cloned repo. Hopefully, that'll help you out. :)
That does not work. It gives and internal server error as soon as you try using app.render.
It doesn't work when I clone it from the repo either. The only thing I've changed were the values in secret.json
On local routes work fine, except for the dynamic "_breed" route. It results in 404 Not Found.
On deploying to AWS all routes result in message: "Internal server error" ... you can check it out at ecom.ideamappers.com
FWIW, you're probably seeing issue from not deploying with custom domain and needing to have the stage in the path to access the resource, e.g.
https://XXXXX.execute-api.us-east-1.amazonaws.com/production/_next/static/YYYYY/pages/index.js
is needed buthttps://XXXXX.execute-api.us-east-1.amazonaws.com/_next/static/YYYYY/pages/index.js
is what the express response actually renders.This explains some of issue and attempts to make it work github.com/dougmoscrop/serverless-...
as well as this: github.com/zeit/next.js/issues/6447