Skip to content
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

Revert esbuild from ^0.13.4 to 0.12.9 #199

Merged
merged 1 commit into from
Oct 27, 2021
Merged

Revert esbuild from ^0.13.4 to 0.12.9 #199

merged 1 commit into from
Oct 27, 2021

Conversation

thiskevinwang
Copy link
Contributor

@thiskevinwang thiskevinwang commented Oct 21, 2021

Reverts #194

esbuild@^0.13.4 causes an underlying lambda function (during Vercel ISR) to error.

Worth looking into evanw/esbuild@v0.12.9...v0.13.4

Error output
START RequestId: 7f15820d-e63e-4876-9a95-a5caff7f0a67 Version: $LATEST
2021-10-21T19:10:23.384Z	7f15820d-e63e-4876-9a95-a5caff7f0a67	WARN	Error: The package "esbuild-linux-64" could not be found, and is needed by esbuild.

If you are installing esbuild with npm, make sure that you don't specify the
"--no-optional" flag. The "optionalDependencies" package.json feature is used
by esbuild to install the correct binary executable for your current platform.
    at generateBinPath (/var/task/website/node_modules/esbuild/lib/main.js:1642:15)
    at esbuildCommandAndArgs (/var/task/website/node_modules/esbuild/lib/main.js:1698:11)
    at ensureServiceIsRunning (/var/task/website/node_modules/esbuild/lib/main.js:1855:25)
    at Object.transform (/var/task/website/node_modules/esbuild/lib/main.js:1750:37)
    at serialize (/var/task/website/node_modules/next-mdx-remote/dist/serialize.js:287:43)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async renderPageMdx (/var/task/website/.next/server/chunks/921.js:3166:21)
    at async generateStaticProps (/var/task/website/.next/server/chunks/921.js:3339:11)
    at async getStaticProps (/var/task/website/.next/server/pages/api-docs/[[...page]].js:62:19)
    at async Object.renderToHTML (/var/task/website/node_modules/next/dist/server/render.js:329:24)
END RequestId: 7f15820d-e63e-4876-9a95-a5caff7f0a67
REPORT RequestId: 7f15820d-e63e-4876-9a95-a5caff7f0a67	Duration: 1122.81 ms	Billed Duration: 1123 ms	Memory Size: 1024 MB	Max Memory Used: 175 MB

@thiskevinwang thiskevinwang requested a review from a team October 21, 2021 19:37
@thiskevinwang
Copy link
Contributor Author

related: #197

@PabloSzx
Copy link
Contributor

I feel like this issue should be posted in https://github.com/evanw/esbuild rather than here, since it's not an issue with next-mdx-remote

@jescalan
Copy link
Collaborator

Yeah, I'd love to get to the bottom of this rather than reverting if we are able to 🙏

@thiskevinwang thiskevinwang changed the title Revert "update esbuild to ^0.13.4" Revert esbuild from ^0.13.4 to 0.12.9 Oct 21, 2021
@PabloSzx
Copy link
Contributor

PabloSzx commented Oct 21, 2021

Another option is to have esbuild as peer dependency and leave up to the user to use esbuild 0.13 vs 0.12, or even allow an alias to another version, but that would be a new major for next-mdx-remote, and it also fixes the very common issue of having duplicated esbuilds

@thiskevinwang thiskevinwang marked this pull request as draft October 21, 2021 20:03
@thiskevinwang
Copy link
Contributor Author

Good call @PabloSzx!

I'll see what I can reasonably grok from evanw/esbuild@v0.12.9...v0.13.4

Closing this for now!

@jescalan jescalan reopened this Oct 27, 2021
@jescalan jescalan marked this pull request as ready for review October 27, 2021 14:39
@jescalan jescalan merged commit 1f3422e into main Oct 27, 2021
@jescalan
Copy link
Collaborator

We spent some time looking into this and there isn't a straightforward fix to getting the latest esbuild working in serverless environments, so we are going to roll back for now to prevent continued errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants