esbuild: Wasm build doesn't work on Windows
Running a build on Windows doesn’t work when using the esbuild-wasm
package. It works fine when using esbuild
(but we’d prefer to avoid that since it requires a postinstall script).
Repro:
git clone git@github.com:yarnpkg/berry && cd berry
git checkout mael/esbuild-2
yarn build:cli
Error:
error: Invalid path: C:\berry\packages\yarnpkg-cli\bundles\yarn.js
at failureErrorWithLog (C:\berry\.yarn\cache\esbuild-wasm-npm-0.8.33-0589ac914f-8d0542a70c.zip\node_modules\esbuild-wasm\lib\main.js:969:15)
at buildResponseToResult (C:\berry\.yarn\cache\esbuild-wasm-npm-0.8.33-0589ac914f-8d0542a70c.zip\node_modules\esbuild-wasm\lib\main.js:767:32)
at C:\berry\.yarn\cache\esbuild-wasm-npm-0.8.33-0589ac914f-8d0542a70c.zip\node_modules\esbuild-wasm\lib\main.js:819:20
at handleIncomingPacket (C:\berry\.yarn\cache\esbuild-wasm-npm-0.8.33-0589ac914f-8d0542a70c.zip\node_modules\esbuild-wasm\lib\main.js:566:9)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25 (17 by maintainers)
Commits related to this issue
- fix stdin with wasm on windows (#687) — committed to evanw/esbuild by evanw 3 years ago
- hack around node windows unicode bug (#687) — committed to evanw/esbuild by evanw 3 years ago
https://github.com/nodejs/node/issues/36616#issuecomment-757929741 mentioned:
See https://github.com/evanw/esbuild/commit/93423e52afe2356cc48dfc71fcb71c8cbc22a953#commitcomment-46371890
After reviewing 9ea2076 I can report that npm/esbuild-wasm/exit0/darwin-x64-LE.node works correctly on mac OS 10.9. The prebuilt zero dependency wasm-napi-exit0 dynamic libraries are a good workaround.