title: How to solve an error while trying to npm i the modules in a React project
body: <p>Following some problems when trying to install some npms, I've deleted the entire node_modules folder in order to re-install it with the hope that it would fix the problem. Prior to the deletion of the folder, my project worked fine (just couldn't install new npms). Following the deletion, I'm now unable to reinstall the modules (npm i) as it keeps giving me a huge error in the process... I've also tried to use a backup package.json and package-lock that I know are in good order but it keeps giving me the same errors all the time.</p>
  <p>Would appreciate if someone could assist.</p>
  <p>The error:</p>
  <pre><code>npm ERR! code 1
  npm ERR! path C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-sass
  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 node-gyp@7.1.2
  npm ERR! gyp info using node@14.16.0 | win32 | x64
  npm ERR! gyp ERR! find Python
  npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
  npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
  npm ERR! gyp ERR! find Python checking if &quot;python3&quot; can be used
  npm ERR! gyp ERR! find Python - &quot;python3&quot; is not in PATH or produced an error
  npm ERR! gyp ERR! find Python checking if &quot;python&quot; can be used
  npm ERR! gyp ERR! find Python - &quot;python&quot; is not in PATH or produced an error
  npm ERR! gyp ERR! find Python checking if &quot;python2&quot; can be used
  npm ERR! gyp ERR! find Python - &quot;python2&quot; is not in PATH or produced an error
  npm ERR! gyp ERR! find Python checking if Python is C:\Python37\python.exe
  npm ERR! gyp ERR! find Python - &quot;C:\Python37\python.exe&quot; could not be run
  npm ERR! gyp ERR! find Python checking if Python is C:\Python27\python.exe 
  npm ERR! gyp ERR! find Python - &quot;C:\Python27\python.exe&quot; could not be run  
  npm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python
  npm ERR! gyp ERR! find Python - &quot;py.exe&quot; is not in PATH or produced an error
  npm ERR! gyp ERR! find Python
  npm ERR! gyp ERR! find Python **********************************************************
  npm ERR! gyp ERR! find Python You need to install the latest version of Python.
  npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
  npm ERR! gyp ERR! find Python you can try one of the following options:    
  npm ERR! gyp ERR! find Python - Use the switch --python=&quot;C:\Path\To\python.exe&quot;
  npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)        
  npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
  npm ERR! gyp ERR! find Python - Set the npm configuration variable python: 
  npm ERR! gyp ERR! find Python   npm config set python &quot;C:\Path\To\python.exe&quot;
  npm ERR! gyp ERR! find Python For more information consult the documentation at:
  npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
  npm ERR! gyp ERR! find Python **********************************************************
  npm ERR! gyp ERR! find Python
  npm ERR! gyp ERR! configure error
  npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
  npm ERR! gyp ERR! stack     at PythonFinder.fail (C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-python.js:302:47)npm ERR! gyp ERR! stack     at PythonFinder.runChecks (C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-python.js:136:21)
  npm ERR! gyp ERR! stack     at PythonFinder.&lt;anonymous&gt; (C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-python.js:200:18)
  npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-python.js:266:16)
  npm ERR! gyp ERR! stack     at exithandler (child_process.js:315:5)        
  npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:327:5)
  npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:315:20)        
  npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
  npm ERR! gyp ERR! stack     at onErrorNT (internal/child_process.js:465:16)npm ERR! gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
  npm ERR! gyp ERR! System Windows_NT 10.0.19042
  npm ERR! gyp ERR! command &quot;C:\\nodejs\\node.exe&quot; &quot;C:\\Users\\Dana\\Desktop\\dev\\airbnb-mock-proj\\frontend\\node_modules\\node-gyp\\bin\\node-gyp.js&quot; &quot;rebuild&quot;
  npm ERR! gyp ERR! cwd C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-sass
  npm ERR! gyp ERR! node -v v14.16.0
  npm ERR! gyp ERR! node-gyp -v v7.1.2
  npm ERR! gyp ERR! not ok ```
  
  
  Following the recommendation, I've reinstalled node and Python (though I'm not completely sure how Python is related as my project is pure js and React) and now I've got some more problems- in addition, it tells me that I should update vscode, which I did but it still gives me the below error:
  
      npm ERR! code 1
      npm ERR! path C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-sass
      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 node-gyp@7.1.2
      npm ERR! gyp info using node@14.17.0 | win32 | x64
      npm ERR! gyp info find Python using Python version 3.9.5 found at &quot;C:\Users\Dana\AppData\Local\Programs\Python\Python39\python.exe&quot;
      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
      npm ERR! gyp ERR! find VS looking for Visual Studio 2015
      npm ERR! gyp ERR! find VS - not found
      npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
      npm ERR! gyp ERR! find VS 
      npm ERR! gyp ERR! find VS **************************************************************
      npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
      npm ERR! gyp ERR! find VS including the &quot;Desktop development with C++&quot; workload.
      npm ERR! gyp ERR! find VS For more information consult the documentation at:
      npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
      npm ERR! gyp ERR! find VS **************************************************************
      npm ERR! gyp ERR! find VS 
      npm ERR! gyp ERR! configure error 
      npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
      npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
      npm ERR! gyp ERR! stack     at C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-visualstudio.js:74:16
      npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
      npm ERR! gyp ERR! stack     at C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-visualstudio.js:70:14
      npm ERR! gyp ERR! stack     at C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\find-visualstudio.js:372:16
      npm ERR! gyp ERR! stack     at C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\util.js:54:7
      npm ERR! gyp ERR! stack     at C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-gyp\lib\util.js:33:16
      npm ERR! gyp ERR! stack     at ChildProcess.exithandler (child_process.js:326:5)
      npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:376:20)
      npm ERR! gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
      npm ERR! gyp ERR! System Windows_NT 10.0.19042
      npm ERR! gyp ERR! command &quot;C:\\nodejs\\node.exe&quot; &quot;C:\\Users\\Dana\\Desktop\\dev\\airbnb-mock-proj\\frontend\\node_modules\\node-gyp\\bin\\node-gyp.js&quot; &quot;rebuild&quot;
      npm ERR! gyp ERR! cwd C:\Users\Dana\Desktop\dev\airbnb-mock-proj\frontend\node_modules\node-sass
      npm ERR! gyp ERR! node -v v14.17.0
      npm ERR! gyp enter code hereERR! node-gyp -v v7.1.2
      npm ERR! gyp ERR! not ok
  </code></pre>