cli
cli copied to clipboard
Currently not working on arm64, but easy to workaround/fix
https://www.npmjs.com/package/bin-wrapper uses an outdated library called https://www.npmjs.com/package/os-filter-obj which doesn't support non-Intel arch: https://github.com/kevva/os-filter-obj/issues/3
This makes swcx currently not work via this wrapper.
https://github.com/swc-project/cli/blob/df9b9ec04201ac353c3e794fed6fc29152fc4cb0/src/swcx/index.ts#L131
Removing platform and arch here, makes it work fine and should also cause no problems since with the getBinaryName() function we already download the correct platform and arch from the releases page.
https://github.com/swc-project/cli/blob/df9b9ec04201ac353c3e794fed6fc29152fc4cb0/src/swcx/index.ts#L101 https://github.com/swc-project/cli/blob/df9b9ec04201ac353c3e794fed6fc29152fc4cb0/src/swcx/index.ts#L110
Also not able to use the CLI at all. npx swc or npm i -g swc on a Macbook M1
I did add platform / arch explicitly to workaround some issue, problem is I do not remember what the problem was. :/
@wesbos this issue is not related with those, and the pkg name for the swc cli is @swc/cli, not swc.