Comments (10)
Version 13 removed the deprecated target: serverless
(See notes: https://github.com/vercel/next.js/releases/tag/v13.0.0)
Nextjs likes to break things on every major release, so it's extremely hard for frameworks like this to keep up. Hopefully things are better moving forward though.
Unfortunately the maintainer isn't active on this project, and I'd recommend this project: https://github.com/jetbridge/sst-prisma. They are using serverless-nextjs
, which its maintainer also went AWOL... but the SST team is working on implementing their own nextjs standalone deployment (see: https://github.com/jetbridge/cdk-nextjs).
That project is still WIP, but the maintainer is very active. The amplify-hosting team is working on a solution too: aws-amplify/amplify-hosting#2343.
It looks like we're going to have to wait til sometime next year to having a working system.
from terraform-aws-next-js.
Felix now works at Vercel (darn Vercel for poaching everyone... serverless-nextjs and now our beloved Felix).
https://twitter.com/ofhouse/status/1590133247823921152
If anyone is interested in another serverless framework, I'd recommend https://github.com/jetbridge/sst-prisma. One of the contributors has made great progress on the standalone nextjs
component.
We are able to deploy nextjs 13 via SST. Join and ask questions on https://discord.com/channels/983865673656705025/1027265626085019769
Hopefully the Vercel guys don't see this and poach them too.
from terraform-aws-next-js.
@stamatim Hey, target: serverless
has been removed in NextJS 13+. The target properly is set under the hood of this library to generate the build.
I'd recommend moving away from this terraform library and into sst
: https://discord.gg/sst (as this is no longer being maintained).
There is a new initiative called open-next that aims to standardize nextjs deployments across various cloud providers.
eg:
1. create a new Next.js app npx create-next-app@latest
2. go into the Next.js app and install npm install --save-dev sst@rc
3. add an sst.config.js
import { NextjsSite } from "sst/constructs"
export default {
config: () => ({
name: "my-app",
region: "us-east-1",
}),
stacks: async (app) => {
app.stack(function Web(ctx) {
new NextjsSite(ctx.stack, "MySite")
});
},
}
4. run npx sst deploy
from terraform-aws-next-js.
@R-Bower https://discord.gg/sst
Nextjs channel
from terraform-aws-next-js.
@khuezy I've tried to replicate the nextjs deployment but am seeing some build errors. Tried to join the discord but the link you provided takes me to a broken server.
from terraform-aws-next-js.
Having this issue as well. Particularly the:
Error: The "target" property is no longer supported in next.config.js.
I do not have any "target" property in my nextjs.config.js
file...
/**
* @type {import('next').NextConfig}
*/
module.exports = {
output: 'standalone',
images: {
domains: [
'images.unsplash.com',
],
},
async headers() {
return [
{
source: '/api/:path*',
headers: [
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
{ key: 'Access-Control-Allow-Origin', value: '*' },
{ key: 'Access-Control-Allow-Methods', value: 'GET,OPTIONS,PATCH,DELETE,POST,PUT' },
{
key: 'Access-Control-Allow-Headers',
value:
'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version',
},
],
},
];
},
};
from terraform-aws-next-js.
@R-Bower hey just wanted to check did you manage to find any solution ? Thanks
from terraform-aws-next-js.
@R-Bower hey just wanted to check did you manage to find any solution ? Thanks
I went with @khuezy's recommendation and that's been working well for me.
from terraform-aws-next-js.
@R-Bower ok great. Thanks
from terraform-aws-next-js.
Hi everyone. With my team, we created a terraform module to deploy next.js apps on AWS.
(we support next.js v13, soon v14 too)
Feel free to try it
from terraform-aws-next-js.
Related Issues (20)
- Modify proxy to force a version change HOT 1
- Unable to attach policy to lambda, since the iam.tf is missing in all versions starting from 1.0.0-canary.2 HOT 1
- Error: Authentication Failed Returns Status Code 0
- What services does this library use internally to manage deployments? HOT 1
- Unable to use redirect inside getServerSideProps HOT 3
- [Bug] Error while using middleware from Next 12.2 HOT 1
- TimeoutError: Promise timed out after 300000 milliseconds HOT 1
- Question: how can I use this module if I am using Cloudflare for DNS management and WAF? HOT 2
- Dynamic Routes like [id].tsx doesn't be update in my github action
- Q: What permissinos are needed for deployment? HOT 1
- One or more of the CNAMEs you provided are already associated with a different resource. HOT 1
- Cannot deploy - .next-tf/lambdas\__NEXT_PAGE_LAMBDA_0.zip: no such file or directory HOT 1
- Is there a localstack sample available? HOT 1
- Getting Error during creating resources with terraform
- Deployment not deletes old files from s3 HOT 1
- NextAuth CLIENT_FETCH_ERROR , NEXTAUTH_URL
- New deployments not possible due as AWS ACLs are disabled by default HOT 1
- Alternatives? HOT 2
- Lambda functions no longer support NodeJS `v14` . HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-next-js.