gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/node_modules/sharp/.node-gyp"
should be /usr/local/lib/nod_modules/sharp/
and /usr/local/bin for node_modules/.bin
The npm install on wrong directory
should be
/usr/local/lib/nod_modules/sharp/
and/usr/local/bin
fornode_modules/.bin