elm-lang / elm-platform

Bundle of all core development tools for Elm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help users fix npm permissions issues

rtfeldman opened this issue · comments

By default, npm install -g often has the wrong permissions and blows up. This is an npm issue, but when people encounter this problem in the course of executing npm install -g elm, they often report it as an Elm issue here. For example:

We could potentially improve this user experience by running a preinstall script to detect where npm is going to try to perform the global installation, checking the permissions on that directory, and figuring out of there's going to be a problem. If there will be, we can provide a more helpful error message than the default EACCESS explosion, and point users to the docs on how to resolve the problem.

This could not only reduce the number of misreported issues on this repo, it could also help users get npm configured properly - as opposed to their re-running the command with sudo, which is a quick but suboptimal fix.

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.

Tracking in #225