'node-gyp error when i try to install npm, Using the command: "npm i" to install rdkafka

The error i get in the terminal:

<
npm ERR! code 1
npm ERR! path C:\Users\ofirr\Desktop\study\Third year\Semester A\Big databases Cloud computing\BigData-Final-Project\Part-A\node_modules\node-rdkafka
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "C:\Users\ofirr\AppData\Local\Programs\Python\Python310\python.exe"     
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details C:\Users\ofirr\AppData\Local\npm-cache\_logs\2022-04-12T15_12_10_659Z-debug-0.log>

This error pops up after the command: "npm i"

I tried deleting and reinstalling Node.js - and it did not work



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source