npm_config_node_gyp

C++
# Open the terminal as an administrator
# Go to your project folder and run:
npm install sharp@latest
# If the error persists
npm config set node_gyp
npm config set msvs_version 2017
npm install
Source

Also in C++: