Unable to use @crowdin/cli from NPM when running on a M1 computer
See original GitHub issueDescribe the bug
It’s not possible to use the Crowdin CLI from NPM on M1 computers because jdeploy
isn’t able to install the appropriate Java runtime for the architecture.
To Reproduce Steps to reproduce the behavior:
- On an Apple M1 computer
- Execute CLI command:
npx @crowdin/cli
- See an error
Need to install the following packages:
@crowdin/cli
Ok to proceed? (y) y
Installing/Updating JRE in /Users/josh/.jdeploy...
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated node-jre@0.2.3: discontinued
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /Users/josh/.jdeploy/node_modules/node-jre
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! unsupported architecture: arm64
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/josh/.npm/_logs/2022-01-16T21_44_06_851Z-debug-0.log
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Expected behavior
The crowdin
CLI binary to successfully install the JRE runtime for Apple M1 computers and then be successfully able to be used.
Environment:
- OS: macOS
- Version 12.1 (21C52)
Screenshots N/A
Additional context
It appears that the CLI uses jdeploy
to install the appropriate JRE runtime. I’ve sent a patch to jdeploy to handle this architecture: https://github.com/shannah/jdeploy/pull/21, however it appears that crowdin currently uses an old version of jdeploy so I’m not sure how easy it is to upgrade to the current one (or a fork with this patch applied)
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (7 by maintainers)
Top GitHub Comments
Amazing! Thanks so much for the quick resolution @andrii-bodnar and for your help @shannah 🙌
Hi @josh-,
Fixed, will be available in the next version of CLI.