elm-lang / elm-platform

Bundle of all core development tools for Elm
BSD 3-Clause "New" or "Revised" License
762 stars 125 forks source link

ubuntu 16.04, node v8.5.0,npm 5.4.1 #218

Closed mihongkun closed 6 years ago

mihongkun commented 7 years ago

$ sudo npm install -g elm npm WARN deprecated node-uuid@1.4.8: Use uuid module instead /usr/bin/elm -> /usr/lib/node_modules/elm/binwrappers/elm /usr/bin/elm-make -> /usr/lib/node_modules/elm/binwrappers/elm-make /usr/bin/elm-package -> /usr/lib/node_modules/elm/binwrappers/elm-package /usr/bin/elm-reactor -> /usr/lib/node_modules/elm/binwrappers/elm-reactor /usr/bin/elm-repl -> /usr/lib/node_modules/elm/binwrappers/elm-repl

elm@0.18.0 install /usr/lib/node_modules/elm node install.js

Error extracting linux-x64.tar.gz - Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/elm/Elm-Platform' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! elm@0.18.0 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the elm@0.18.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/m/.npm/_logs/2017-09-14T08_43_28_874Z-debug.log

process-bot commented 7 years ago

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.

mihongkun commented 7 years ago

Solution by this

tino415 commented 7 years ago

I had same problem, but solved it by running sudo npm install -g elm --unsafe-perm=true --allow-root from this issue in electron

ubuntu 16.04 node -v v7.10.0 npm -v 5.3.0

titomarifrancis commented 7 years ago

I also encountered this issue recently. The problem I think is that the default installation of NodeJS in Ubuntu 16.04 installs "nodejs" rather than "node", to resolve this, run this command on CLI:

sudo ln -sf /usr/bin/nodejs /usr/bin/node

After this, try to install elm as usual. Hope this helps :)

Chilinot commented 6 years ago

Confirming the issue on my system as well: Fedora release 27 Node v8.9.3 npm 5.5.1

@tino415's solution worked for me

palutz commented 6 years ago

Same problem here: Ubuntu 17.04 node v 8.9.4 npm v 5.3.0

@mihongkun that worked for me.Thanks

s0kil commented 6 years ago

@tino415 Thanks! sudo npm install -g elm --unsafe-perm=true --allow-root Worked for me.

rtfeldman commented 6 years ago

OP's issue has been resolved: https://github.com/elm-lang/elm-platform/issues/218#issuecomment-329420591