TL;DR: On Windows, node-gyp should install into %LOCALAPPDATA%/<vendor>/<product>.
In Linux, the accepted location to store :allthethings: is the home directory (~). On Windows, this is not appropriate and almost nothing should go into the root of the USERPROFILE directory or HOME directory. At the moment, node-gyp installs into ~ on Windows 10. It should instead install to somewhere more appropriate such as:
%APPDATA%/<vendor>/<product> for small user config of a particular product. Note, this is synced over a network/internet so nothing in here should be particularly large.
%LOCALAPPDATA%/<vendor>/<product> for large user config/extensions/per-user app installs/per-user caching. This folder is not synced over a network/internet so it can be big. Also, it is often redirected to a larger slower drive.
%PROGRAMDATA%/<vendor>/<product> for local (not synced over network) multi-user configuration data. This data is more permissive in that any user can read/write to it unlike %PROGRAMFILES% which is read only for everyone but admins. Care should be taken with regards to security any executable written here.
%PROGRAMFILES%/<vendor>/<product> for multi-user application data. Only admins can write here, but everyone can read. Good place to put installed software.
For the case of node_gyp, I assume that %LOCALAPPDATA%/<vendor>/<product> or %PROGRAMFILES%/<vendor>/<product> is the appropriate location, depending on whether there is an expectation of admin rights at install time.
Note: None of the above folders are %USERPROFILE% because the only thing that should use that folder are save dialogs. 😄
TL;DR: On Windows, node-gyp should install into
%LOCALAPPDATA%/<vendor>/<product>.In Linux, the accepted location to store :allthethings: is the home directory (
~). On Windows, this is not appropriate and almost nothing should go into the root of theUSERPROFILEdirectory orHOMEdirectory. At the moment, node-gyp installs into~on Windows 10. It should instead install to somewhere more appropriate such as:%APPDATA%/<vendor>/<product>for small user config of a particular product. Note, this is synced over a network/internet so nothing in here should be particularly large.%LOCALAPPDATA%/<vendor>/<product>for large user config/extensions/per-user app installs/per-user caching. This folder is not synced over a network/internet so it can be big. Also, it is often redirected to a larger slower drive.%PROGRAMDATA%/<vendor>/<product>for local (not synced over network) multi-user configuration data. This data is more permissive in that any user can read/write to it unlike%PROGRAMFILES%which is read only for everyone but admins. Care should be taken with regards to security any executable written here.%PROGRAMFILES%/<vendor>/<product>for multi-user application data. Only admins can write here, but everyone can read. Good place to put installed software.For the case of
node_gyp, I assume that%LOCALAPPDATA%/<vendor>/<product>or%PROGRAMFILES%/<vendor>/<product>is the appropriate location, depending on whether there is an expectation of admin rights at install time.Note: None of the above folders are
%USERPROFILE%because the only thing that should use that folder are save dialogs. 😄