Plugin dependency management (atom-lint incompatibility with Atom 0.121)


#1

I recently upgraded to Atom 0.121 and noticed that atom-lint was incompatible.

Atom Lint 0.14.5
Listed below are the incompatible native modules that this package depends on.

pathwatcher@1.5.0
Error message: Module did not self-register.

runas@0.5.4
Error message: Module did not self-register.

I found https://github.com/yujinakayama/atom-lint/issues/81 and checked my locally installed version of pathwatcher was indeed 1.5. I tried clearing the cache as mentioned in the ticket, but that didn’t work.

I then reinstalled atom-lint to the same version that I had before (the latest) and everything worked. I am not too familiar with Node package management and what Atom does to modify it for itself, but what could I have done to avoid the reinstall? It makes me wonder what other packages are out of date?


#2

Basically, atom packages are regular node modules, their dependencies are stored in the node_modules directory. When you install an atom package, it download it in your ~/.atom/packages directory and then run apm install in the package directory.
Normally you should be able to run apm update in the package directory to update the dependencies.
In last resort, delete the node_modules directory and run apm install again, but it should not be necessary.