esbuild fails on `Generating static pages` step in serverless Next.js applications
See original GitHub issuemdx-bundler
version: 3.1.2node
version: any (tried 12, 14, and 15.12)npm
version: 7.6.3
Relevant code or config: repl.it of bug
What you did: Added target: "serverless"
to a next.js project with mdx-bundler
What happened:
Reproduction repository: https://replit.com/@TheoBr/mdx-bundler-static-demo#README.md
Problem description: Seems to be an issue with how esbuild is run in next.js’s serverless
path. Not functionality I’m super familiar with, I just know that netlify forces it to be enabled. (fwiw I’ve had no issues using this with vercel (see: tt.fm)
Suggested solution: Bug EvanW or Guillermo maybe? I’m lost on this one
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Content Types - ESBuild
Each content type has an associated "loader" which tells esbuild how to interpret the file contents. Some file extensions already have a loader...
Read more >serverless AWS deployment fails because of esbuild
When I try to deploy my serverless application to AWS I'm running into this error: I'm using the aws-nodejs-typescript template.
Read more >Serverless SSR with React 18 and NextJS 12 in AWS
The next step is to create a CloudFront distribution to cache and forward requests to either the AWS Lambda or to the S3...
Read more >Build functions - Netlify Docs
Create functions source files in TypeScript, JavaScript, and Go. ... To add a serverless function to your project, create a TypeScript file in...
Read more >Next.js - Full Context Review
Then continue with the main structure of a Next.js application. ... server rendered- and incrementally generated static pages.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kentcdodds I was thinking the same thing.
I was thinking this is all it would need:
That way we fix it if we need to and don’t interferrer with anyones overrides
You know what… The more I think about this, the more I think we should probably support this out of the box 🤔 We know where the esbuild binary should be, so we can set that env variable ourselves if it’s not already set.