Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not find any Visual Studio installation to use (VS2022 Preview) #2520

Closed
Aviortheking opened this issue Oct 11, 2021 · 10 comments · Fixed by #2521 or #2533
Closed

Error: Could not find any Visual Studio installation to use (VS2022 Preview) #2520

Aviortheking opened this issue Oct 11, 2021 · 10 comments · Fixed by #2521 or #2533

Comments

@Aviortheking
Copy link

Please look thru your error log for the string gyp info using node-gyp@ and if the version number is less than the current release of node-gyp then please upgrade using the instructions at https://github.com/nodejs/node-gyp/blob/master/docs/Updating-npm-bundled-node-gyp.md and try your command again.

Requests for help with node-sass are very common. Please be aware that this package is deprecated, you should seek alternatives and avoid opening new issues about it here.

  • Node Version: 16.9.1, 7.21.1
  • Platform: Windows 11 Home 21H2 22000.194
  • Compiler: 17.0.0.45303
  • Module: node-gyp configure
Verbose output (from npm or node-gyp):
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\micro\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'configure',
gyp verb cli   '--verbose'
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - executable path is "C:\Users\micro\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
gyp verb find Python - executing "C:\Users\micro\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe" to get version
gyp verb find Python - version is "3.9.7"
gyp info find Python using Python version 3.9.7 found at "C:\Users\micro\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe"
gyp verb get node dir no --target version specified, falling back to host node version: 16.9.1
gyp verb command install [ '16.9.1' ]
gyp verb install input version string "16.9.1"
gyp verb install installing version: 16.9.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 16.9.1
gyp verb build dir attempting to create "build" dir: D:\Git\****\build
gyp verb build dir "build" dir needed to be created? No
gyp verb find VS msvs_version not set from command line or npm config
gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp verb find VS unknown version "undefined" found at "D:\Program Files\Microsoft Visual Studio\2022\Preview"
gyp verb find VS could not find a version of Visual Studio 2017 or newer to use
gyp verb find VS looking for Visual Studio 2015
gyp ERR! stack     at C:\Users\micro\AppData\Roaming\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\micro\AppData\Roaming\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\micro\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--verbose"
gyp ERR! cwd D:\Git\*****
gyp ERR! node -v v16.9.1
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok

this is related to the now closed #2462

@cclauss
Copy link
Contributor

cclauss commented Oct 11, 2021

I believe that was fixed in gyp-next v0.10.0 https://github.com/nodejs/gyp-next/blob/main/CHANGELOG.md

@gengjiawen
Copy link
Member

Reopen for still need more code to compate

@ghost
Copy link

ghost commented Nov 4, 2021

This seems to be happening still with node-gyp 8.3.0 nodejs/gyp-next#132

@gengjiawen
Copy link
Member

please try 8.4

@ghost
Copy link

ghost commented Nov 5, 2021

Yup 8.4 fixed it, thanks

@thierryntoh24
Copy link

8.4.1, still seeing this error, although i literally just installed VS 2022 with the C++ package

@EricHerlitz
Copy link

8.4.1, still seeing this error, although i literally just installed VS 2022 with the C++ package

Second that!

@cclauss
Copy link
Contributor

cclauss commented Jan 26, 2022

@nodejs/platform-windows

@gengjiawen
Copy link
Member

Please provide verbose output like @Aviortheking did. Just saying not working won't get you anywhere.

@thierryntoh24
Copy link

Finally found a solution here a while back here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants