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

You installed esbuild for another platform than the one you're currently using #3760

Open
ccfai8 opened this issue May 10, 2024 · 2 comments

Comments

@ccfai8
Copy link

ccfai8 commented May 10, 2024

You installed esbuild for another platform than the one you're currently using. This won't work because esbuild is written with native code and needs to install a platform-specific binary executable. Specifically the "@esbuild/darwin-arm64" package is present but this platform needs the "@esbuild/linux-arm64" package instead. People often get into this situation by installing esbuild on Windows or macOS and copying "node_modules" into a Docker image that runs Linux, or by copying "node_modules" between Windows and WSL environments. If you are installing with npm, you can try not copying the "node_modules" directory when you copy the files over, and running "npm ci" or "npm install" on the destination platform after the copy. Or you could consider using yarn instead of npm which has built-in support for installing a package on multiple platforms simultaneously. If you are installing with yarn, you can try listing both this platform and the other platform in your ".yarnrc.yml" file using the "supportedArchitectures" feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures Keep in mind that this means multiple copies of esbuild will be present. Another alternative is to use the "esbuild-wasm" package instead, which works the same way on all platforms. But it comes with a heavy performance cost and can sometimes be 10x slower than the "esbuild" package, so you may also not want to do that.

Received an error after successfully deployed. The error occurs when I visit my outstatic posts. Hopefully someone can help me please.. thanks!

@berenddeboer
Copy link
Contributor

No one copies node_modules, that's such bad practice I can't even imaging someone doing this.

@ccfai8
Copy link
Author

ccfai8 commented May 15, 2024

No one copies node_modules, that's such bad practice I can't even imaging someone doing this.

No I didn't do anything to copy it. I use the default sst config for deployment. I did not do anything else.

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

No branches or pull requests

2 participants