mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Install: warn about filesystem owner running npm v8+ as root
This commit is contained in:
@@ -43,7 +43,9 @@ const installationForced = !!(process.env.npm_config_sharp_install_force || proc
|
||||
const fail = function (err) {
|
||||
libvips.log(err);
|
||||
if (err.code === 'EACCES') {
|
||||
libvips.log('Are you trying to install as a root or sudo user? Try again with the --unsafe-perm flag');
|
||||
libvips.log('Are you trying to install as a root or sudo user?');
|
||||
libvips.log('- For npm <= v6, try again with the "--unsafe-perm" flag');
|
||||
libvips.log('- For npm >= v8, the user must own the directory "npm install" is run in');
|
||||
}
|
||||
libvips.log('Please see https://sharp.pixelplumbing.com/install for required dependencies');
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user