Solution to the EISDIR connundrum


(Brian Thompson) #1

Every day I see one or two people reporting the same EISDIR error when trying to install a package globally. See this as an example.

The argument for installing global packages is one I’d like to avoid, but it seems like the standard is moving towards using something like a node version manager (nvm) to manage your nvm versions, and then maintaining package dependencies inside each project, and referencing whatever you need to run from those packages with npm scripts or actual code itself. Isn’t this the intended use case?

The node version managers are separate from npm, Inc., so that may be problematic seeing that support may dwindle in the future, but they are open source, so they could be forked and maintained under the npm umbrella if those communities cease to support such technologies.

I think the logging is fine. The EISDIR is self-explanatory in my opinion, but the root cause is not always the same.

Wrapping up, seeing the EISDIR error reporting trend in the “support” tag gave rise to this idea, and I thought it’d be worth sharing with the community.

Let me know your thoughts!

Thanks,
Brian


(Lars Willighagen) #2

I’ve seen two main categories, EISDIR in .staging and EISDIR in _cacache. Correct me if I’m wrong though, there might be different causes for each of those. We probably want canonical topics for both to link to. I suggest the following, since they’re the first topics in #bugs for the respective categories.


Unhandled rejection Error: EISDIR: illegal operation on a directory
Unable to install packages on MacOS
opencv4nodejs not installing in MAC OS Mojave 10.14
(Lars Willighagen) #3

Hmm, I guess they’re both the same after all. Also, thanks @shadowspawn for your work on this!