I am expecting that you already executed npm init at first.
I assume you are using windows? I always develop blockchain related stuff on Ubuntu.
Here is what you need to do on windows to set it up properly.
Step 1: npm install -g --production windows-build-tools
Step 2: npm install -g node-gyp
Now it should work!
If you still have a problem make sure ...