-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install error: unpacked_bin is deleted before it's used #20
Comments
Here is the elmi-to-json part of the debug.log if it helps.
|
It failed on macOS if I tried to install elmi-to-json only:
|
I think this is a binwrap problem and not a elmi-to-json issue. binwrap is used to install the binary. |
Has anyone been able to figure out what binwrap could be doing differently that would avoid this problem? |
I agree with @stoeffel. The problem is the need for sudo. Seems that npm itself runs as root and therefore has write access to a directory but npm scripts must have different owner who has no write rights. I think it's a very very very bad idea to run arbitrary scripts pulled from the internet (npm) as a root. |
I'm getting this same error in Debian 10 "buster" when installing with Installing without
|
Ah, okay, so the issue seems to be that The planned fix for that in binwrap is that if it doesn't have write access there then it should fallback to unpacking the binaries somewhere under I'm gonna add these notes to avh4/binwrap#21 |
Work-around is to change npm global install directory: |
Thanks @malaire. Looks good to me :-) |
@avh4 On docker image node:12-alpine
To "fix"...
Apparently the option If that is the case the correct command should be |
@dptole I believe this can be fixed by adding |
I try to install elm-test, that relies on elmi-to-json:
If I attempt to create the dir with:
sudo mkdir -p /usr/lib/node_modules/elm-test/node_modules/elmi-to-json/unpacked_bin
It is deleted before it is used when i run:
sudo npm install -g elm-test
It looks like a race-condition.
The text was updated successfully, but these errors were encountered: