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

Windows: VisualStudioFinder.fail on Node.js v23.6.1 #3123

Open
MAKGAMEROFFICIAL opened this issue Jan 29, 2025 · 12 comments
Open

Windows: VisualStudioFinder.fail on Node.js v23.6.1 #3123

MAKGAMEROFFICIAL opened this issue Jan 29, 2025 · 12 comments

Comments

@MAKGAMEROFFICIAL
Copy link

Version

23.6.1 (latest)

Platform

windows

Subsystem

windows

What steps will reproduce the bug?

npm install package (for example sharp,isolated-vm) and e.t.c

How often does it reproduce? Is there a required condition?

almost everytime 99%

What is the expected behavior? Why is that the expected behavior?

should install package

What do you see instead?

npm error code 1
npm error path C:\Users\user\node_modules\isolated-vm
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || (node-gyp rebuild --release -j max && node-gyp clean)
npm error prebuild-install warn install No prebuilt binaries found (target=23.6.1 runtime=node arch=x64 libc= platform=win32)
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@11.0.0
npm error gyp info using node@23.6.1 | win32 | x64
npm error gyp info find Python using Python version 3.13.1 found at "C:\Users\user\AppData\Local\Programs\Python\Python313\python3.13t.exe"
npm error gyp http GET https://nodejs.org/download/release/v23.6.1/node-v23.6.1-headers.tar.gz
npm error gyp http 200 https://nodejs.org/download/release/v23.6.1/node-v23.6.1-headers.tar.gz
npm error gyp http GET https://nodejs.org/download/release/v23.6.1/SHASUMS256.txt
npm error gyp http GET https://nodejs.org/download/release/v23.6.1/win-x64/node.lib
npm error gyp http 200 https://nodejs.org/download/release/v23.6.1/SHASUMS256.txt
npm error gyp http 200 https://nodejs.org/download/release/v23.6.1/win-x64/node.lib
npm error gyp ERR! find VS
npm error gyp ERR! find VS msvs_version not set from command line or npm config
npm error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm error 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 error gyp ERR! find VS
npm error gyp ERR! find VS Failure details: undefined
npm error 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 error gyp ERR! find VS
npm error gyp ERR! find VS Failure details: undefined
npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2017 as it is only supported up to Node.js 21
npm error gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm error gyp ERR! find VS
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS You need to install the latest version of Visual Studio
npm error gyp ERR! find VS including the "Desktop development with C++" workload.
npm error gyp ERR! find VS For more information consult the documentation at:
npm error gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm error gyp ERR! find VS **************************************************************
npm error gyp ERR! find VS
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm error gyp ERR! stack at VisualStudioFinder.fail (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:118:11)
npm error gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:17)
npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
npm error gyp ERR! stack at async createBuildDir (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:112:18)
npm error gyp ERR! stack at async run (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
npm error gyp ERR! System Windows_NT 10.0.19045
npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release" "-j" "max"
npm error gyp ERR! cwd C:\Users\user\node_modules\isolated-vm
npm error gyp ERR! node -v v23.6.1
npm error gyp ERR! node-gyp -v v11.0.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache_logs\2025-01-29T18_55_21_872Z-debug-0.log

Additional information

its happening since i updated my node version

@StefanStojanovic
Copy link
Contributor

Thanks for reporting this. Based on the issue content, I'd say this is not directly Node.js related, and node-gyp is where this issue should be open, Please close this issue and open it again in that repository (potentially with a more meaningful title). Thanks in advance.

@richardlau richardlau transferred this issue from nodejs/node Jan 30, 2025
@cclauss cclauss changed the title node v 23.6.1 Windows: VisualStudioFinder.fail on Node.js v23.6.1 Jan 30, 2025
@cclauss
Copy link
Contributor

cclauss commented Jan 30, 2025

As discussed at https://github.com/nodejs/node-gyp?tab=readme-ov-file#installation please try again after running:
choco install visualstudio2022-workload-vctools -y

@StefanStojanovic
Copy link
Contributor

StefanStojanovic commented Jan 30, 2025

Thanks for transferring it. Anyway, my comment followed the same lines as Clauss's. Visual Studio is missing and should be installed as it's missing.

@MAKGAMEROFFICIAL
Copy link
Author

As discussed at https://github.com/nodejs/node-gyp?tab=readme-ov-file#installation please try again after running: choco install visualstudio2022-workload-vctools -y

Chocolatey v2.3.0
Chocolatey detected you are not running from an elevated command shell
(cmd/powershell).

You may experience errors - many functions/packages
require admin rights. Only advanced users should run choco w/out an
elevated shell. When you open the command shell, you should ensure
that you do so with "Run as Administrator" selected. If you are
attempting to use Chocolatey in a non-administrator setting, you
must select a different location other than the default install
location. See
https://docs.chocolatey.org/en-us/choco/setup#non-administrative-install
for details.

For the question below, you have 20 seconds to make a selection.

Do you want to continue?([Y]es/[N]o): y

Installing the following packages:
visualstudio2022-workload-vctools
By installing, you accept licenses for the packages.
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'python 3.12.6 constraint: python3 (= 3.12.6)'
Unable to resolve dependency 'kb2919355': Unable to find a version of 'kb2919355' that is compatible with 'dotnetfx 4.8.0.20220524 constraint: kb2919355 (>= 1.0.20160915)', 'KB2999226 1.0.20161023 constraint: kb2919355 (>= 1.0.20160915)', 'vcredist140 14.0.23026 constraint: kb2919355 (>= 1.0.20160915)'.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • visualstudio2022-workload-vctools - Unable to resolve dependency 'kb2919355': Unable to find a version of 'kb2919355' that is compatible with 'dotnetfx 4.8.0.20220524 constraint: kb2919355 (>= 1.0.20160915)', 'KB2999226 1.0.20161023 constraint: kb2919355 (>= 1.0.20160915)', 'vcredist140 14.0.23026 constraint: kb2919355 (>= 1.0.20160915)'.

@MAKGAMEROFFICIAL
Copy link
Author

Thanks for reporting this. Based on the issue content, I'd say this is not directly Node.js related, and node-gyp is where this issue should be open, Please close this issue and open it again in that repository (potentially with a more meaningful title). Thanks in advance.

alright but if you can solve it here?

@StefanStojanovic
Copy link
Contributor

alright but if you can solve it here?

Yep, now it's been moved to the correct repository.

So based on your log there was an issue installing Visual Studio via Chocolatey. If you want, you can open a separate issue for them. You can also install Visual Studio manually as described in this doc and the process should be fairly straightforward.

@MAKGAMEROFFICIAL
Copy link
Author

alright but if you can solve it here?

Yep, now it's been moved to the correct repository.

So based on your log there was an issue installing Visual Studio via Chocolatey. If you want, you can open a separate issue for them. You can also install Visual Studio manually as described in this doc and the process should be fairly straightforward.

i reinstalled chocolatey and it's working now

@cclauss
Copy link
Contributor

cclauss commented Jan 30, 2025

Can this issue be closed?

@MAKGAMEROFFICIAL
Copy link
Author

MAKGAMEROFFICIAL commented Feb 2, 2025

idk as its still have some problems but...
you can close it ig

@cclauss
Copy link
Contributor

cclauss commented Feb 2, 2025

What problems does it still have?

@MAKGAMEROFFICIAL
Copy link
Author

MAKGAMEROFFICIAL commented Feb 2, 2025

What problems does it still have?

most of time it's giving me list of errors on npm install package..

also I updated it to latest version 23.7.0 but I haven't tried it yet.

@StefanStojanovic
Copy link
Contributor

Since the original issue is fixed, I'd suggest closing the issue and potentially opening new ones for the new issue encountered.

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

No branches or pull requests

3 participants