Closed os6sense closed 1 year ago
I have the same problem
I'm trying to get linux-arm64 binaries build for the next release. Can anyone test running the aarch64 binary here: https://elm-format.avh4.net/manual/0.8.5-424-g9e071c6f/ and see if it works in the Linux ARM64 environment that they need it for?
Can anyone test running the aarch64 binary here:
Seems to be working well for me.
(I'm on M1 Mac using Docker Desktop and a linux container.)
$ uname -a
Linux 7bed0a212d7c 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
Fixed in https://github.com/avh4/elm-format/pull/798 The next release (0.8.6) will include official linux-aarch64 static binaries.
Thanks @jsynacek for testing!
With the latest release, I still get the error... Maybe the problem is that the code checks for linux-arm64
while the binary is marked as linux-aarch64
? This architecture check feels a bit redundant to say the least. It's just elm tooling that has this problem, I haven't run into anything like that with other npm packages. Why would elm tooling care about the architecture, anyway?
The binaries work, though.
This works for me, on Linux 712344e8f084 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 GNU/Linux
:
npm install --save-dev elm-tooling
npx elm-tooling init
npx elm-tooling install
./node_modules/.bin/elm-format
You need elm-tooling >= 1.13.0.
This also works for me:
npm install --save-dev elm-format
./node_modules/.bin/elm-format
Is it one of those that you're having problems with?
@jsynacek You can see the values that Node.js uses for the architecture here: https://nodejs.org/api/process.html#processarch
You can run this to see what the values are for your platform: node -p '[process.platform, process.arch]'
elm-tooling
(and the elm-format@0.8.6
npm package) checks the os+architecture because different compiled binaries only work on certain os+arch combinations. For example, a Windows binary does not work on Linux. A Linux x86_64 (x64
using Node.js’ values) binary does not work on Linux aarch64 (arm64
using Node.js’ values).
Most npm packages are written in JavaScript (an interpreted language), so they don’t need to think about architectures. elm-format is written in Haskell (a compiled language), and elm-tooling
and the elm-format@0.8.6
npm package only distribute pre-compiled executables.
Also, next time, it’d be very helpful if you posted the error message you got from the get go.
Edit: Looks like me and @avh4 replied at the same time :)
Ok, I created a minimal package.json
with the following content and it works for me:
{
"name": "test-app",
"version": "1.0.0",
"devDependencies": {
"elm-format": "^0.8.6",
"elm-tooling": "^1.13.0",
"elm": "0.19.1-4"
}
}
So I guess there must be something else in the real package.json
that keeps dragging in the old dependencies.
Also, next time, it’d be very helpful if you posted the error message you got from the get go.
Sorry about not being clearer. When I wrote "With the latest release, I still get the error...", for some reason I thought it was clear that "the error" was the original error from the description.
Anyway, thank you all for the help and for the new release!
Attempting to install and build on a linux based container on an M1 using 0.8.5:
This is a slightly different scenario over running this on darwin-arm64 since here I'm attempting to build and run in a container.