update version of node gyp
Open a terminal or command prompt.
Run the following command to update npm to the latest version:
npm install -g npm
Run the following command to update node-gyp globally:
npm install -g node-gyp
Verify that the update was successful by checking the installed version of node-gyp:
node-gyp --version