Closed globin closed 4 years ago
The minimal solution of this issue is to return null
if directory is not writable. It will trigger fallback in most of packages which use this.
adding support for some kind of env is still a good idea to make installations more controllable.
@sindresorhus will you accept pull-request for minimal solution proposed above?
I don't think we want an environment variable, but checking whether the directory is writeable is a good idea. PR welcome for that.
I'll get this sorted when #18 is resolved to prevent conflicts.
When building node modules with Nix/node2nix
node_modules
is pre-built and mounted read-only, resulting innode_modules/.cache
not being writable. A nice and easy possibility to change the directory would be to allow overriding it with an ENV var (NODE_CACHE_DIR
?)