Open DavidHernandez opened 7 years ago
Thank you @DavidHernandez for the issue. I think the solution to: https://github.com/mattludwigs/elm-version-manager/issues/5 should fix this issue. I am hoping to get around to fixing that issue this coming week.
@mattludwigs thank you for the answer. I will subscribe to the other issue and test if this is still a problem after #5 is fixed.
@DavidHernandez that would be awesome! One of the biggest challenges I am going to face is the all the different systems out there and trying to account for them correctly, so the more diverse the systems trying to use this, better and more reliable we can make it. So by doing a test on your system is a huge help!
@mattludwigs I'm usually online on european office hours in the elm slack and IRC, using david_hernandez as nickname . So feel free to ping me if you need some testing in my system for this or a different issue.
simon@simon-desktop:~/code/sync/Elm/elm-diagrams$ evm use 0.16.0
Using: 0.16.0
fs.js:1021
return binding.symlink(preprocessSymlinkDestination(target, type, path),
^
Error: EACCES: permission denied, symlink '/home/simon/evm/0.16.0/elm' -> '/usr/local/bin/elm'
at Object.fs.symlinkSync (fs.js:1021:18)
at /home/simon/.npm-global/lib/node_modules/elm-version-manager/index.js:111:14
at FSReqWrap.oncomplete (fs.js:136:15)
I'm seeing the same error with a setup based on https://docs.npmjs.com/getting-started/fixing-npm-permissions. And using sudo (Ubuntu) does not help because then the node libraries I install as user are not available.
I'm using EVM on a Debian Stretch machine and when I try to activate a elm version, it gives me errors related with access permission, because it doesn't have access to the /usr/local/bin folder:
Using the same command with sudo didn't solve the issue:
I found a workaround that was manually linking the /usr/local/bin elm binaries to a folder inside the evm folder called "active" and then, I modified this line https://github.com/mattludwigs/elm-version-manager/blob/master/index.js#L33 to be the next:
As that folder is inside the user reign, it has access and everything seems to work fine.
I don't know how common my issue will be, but to be able to configure usrBin without the need of hacking the index.js could be a solution for similar issues to this.