Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upJS error on every elm binary execution #787
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Dec 19, 2016
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Dec 19, 2016
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
halfzebra
Dec 19, 2016
Contributor
@AntouanK you have to use sudo when installing anything with -g flag.
|
@AntouanK you have to use |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
AntouanK
Dec 19, 2016
@halfzebra I have changed the owner in my /local library. And in the docker container I'm root anyway.
So I think that's not the issue. I would see permission errors anyway if that was the problem.
AntouanK
commented
Dec 19, 2016
|
@halfzebra I have changed the owner in my /local library. And in the docker container I'm root anyway. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
halfzebra
Dec 19, 2016
Contributor
@AntouanK it is a known problem which does not throw a permission error for some reason.
ENOENT means there's no elm binary on your machine, and somehow the npm package fails to download elm binaries.
The way I was able to fix it is by running
sudo npm uninstall elm -g
sudo npm i elm -g
I'm reffering to issues #10, #26 and #29 in Create elm App repository.
|
@AntouanK it is a known problem which does not throw a permission error for some reason.
The way I was able to fix it is by running
I'm reffering to issues #10, #26 and #29 in Create elm App repository. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
AntouanK
Dec 20, 2016
So, on my main linux machine, I got yarn installed via apt-get and that solved the problem.
yarn global add elm and it works fine.
Inside the docker container, it is still failing.
I tried a couple of images ( like mhart/alpine-node and node:alpine ) but they both fail with the same error.
sudo makes no sense there since you are already root.
Can anyone try this Dockerfile and let me know what you get?
FROM node:alpine
RUN npm -v
RUN npm i -g elm
RUN which elm
RUN ls -lah $(which elm)
RUN elm -v
AntouanK
commented
Dec 20, 2016
|
So, on my main linux machine, I got Inside the docker container, it is still failing. Can anyone try this
|
AntouanK
closed this
Dec 21, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mradke
Feb 9, 2017
@AntouanK I have the exact same issue with Docker and alpine linux
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn /usr/lib/node_modules/elm/Elm-Platform/0.18.0/.cabal-sandbox/bin/elm ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
Have you resolved the issue before you closed it?
If so: how?
Could it be an issue that musl is being used instead of glibc in alpine linux?
mradke
commented
Feb 9, 2017
|
@AntouanK I have the exact same issue with Docker and alpine linux
Have you resolved the issue before you closed it? Could it be an issue that |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
AntouanK
Feb 17, 2017
@mradke No, I still have the same problem.
I cannot understand why elm makes you install it via npm. Why not release the linux binaries?
I think the problem is the musl library alpine uses.
So elm binaries are looking for a different libraries.
Because when you run the binary, it says not found. Which makes no sense.
I tried to build Elm from source on an alpine image, but I get segmentation fault, so I just gave up and went back to debian. :(
AntouanK
commented
Feb 17, 2017
•
|
@mradke No, I still have the same problem. I think the problem is the I tried to build Elm from source on an alpine image, but I get |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mradke
Feb 20, 2017
Why not release the linux binaries
As far as I understand this is exactly what you get when installing via npm. A prebuilt version of the elm tools.
I think the way to go would be to compile it on an alpine system which might be a bit scary due to the fact that you can barely install the Haskell platform on it :-)
Thank you for coming back on this issue though - maybe I will take a closer look when I have some free time to fiddle around.
mradke
commented
Feb 20, 2017
As far as I understand this is exactly what you get when installing via Thank you for coming back on this issue though - maybe I will take a closer look when I have some free time to fiddle around. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
AntouanK
Feb 20, 2017
@mradke If you do which elm and follow the symlinks, you'll see that you basically are running js files with node, which in turn spawns the actually binary. I don't know why that's necessary.
For alpine, I did find an image that has haskell pre-installed
https://hub.docker.com/r/mitchty/alpine-ghc/
But like I said, building the project throws the seg fault, so I stopped there.
AntouanK
commented
Feb 20, 2017
|
@mradke If you do For alpine, I did find an image that has haskell pre-installed But like I said, building the project throws the seg fault, so I stopped there. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
stoivo
commented
May 10, 2017
•
|
You could try to add it to your PATH
|
AntouanK commentedDec 19, 2016
•
edited
Edited 1 time
-
AntouanK
edited Dec 19, 2016 (most recent)
Hi.
I don't know where this bug fits, so let me know if I have to move it.
Yesterday, I got elm installed (
npm i -g elm) in a new linux machine.Unfortunately I get this error on every elm binary execution.
( also tried installing with
yarn, same error )I also tried installing within docker containers.
Same error every time.
Any idea what it is?
Seems to be coming from some bin wrapper in js.