-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
esbuild not working in prod serverless functions #33294
Labels
bug
Issue was opened via the bug report template.
Comments
I tried manually adding all node_modules/esbuild- files to my functions .nft.json after build but that didn't work either |
Please refer to vercel/nft#246 |
This was referenced Jan 21, 2022
Merged
kodiakhq bot
pushed a commit
that referenced
this issue
Jan 22, 2022
- Fixes #33294 Co-authored-by: JJ Kasper <[email protected]>
natew
pushed a commit
to natew/next.js
that referenced
this issue
Feb 16, 2022
- Fixes vercel#33294 Co-authored-by: JJ Kasper <[email protected]>
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Run
next info
(available from version 12.0.8 and up)Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64
Binaries:
Node: 15.10.0
npm: 7.5.3
Yarn: 1.22.11
pnpm: 5.4.0
Relevant packages:
next: 12.0.8
react: 17.0.2
react-dom: 17.0.2
What version of Next.js are you using?
12.0.8
What version of Node.js are you using?
15.10.0
What browser are you using?
Edge
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
importing esbuild in serverless functions doesn't work in production (but does locally)
Expected Behavior
You should be able to import and use esbuild in API functions without any special configuration
To Reproduce
Reproduction repo. https://github.com/brynshanahan/esbuild-repro
https://esbuild-repro.vercel.app/
Esbuild is being used to compile the code at the top of this page in getStaticProps successfully and the button calls the API endpoint (that runs the exact same code as the getStaticProps function)
The text was updated successfully, but these errors were encountered: