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

Could not find any Visual Studio installation to use #1032

Open
codestitch opened this issue Sep 15, 2022 · 11 comments
Open

Could not find any Visual Studio installation to use #1032

codestitch opened this issue Sep 15, 2022 · 11 comments

Comments

@codestitch
Copy link

Environment details

  • OS: windows
  • OS version: 11
  • node-pty version: 0.10.1
  • electron: 20.1.4
  • xterm: 4.2.0
  • electron-rebuild: 3.2.9

Issue description

Tried building from the example (node-pty/examples/electron). It worked!
However, when upgrading electron and other libs would wouldn't work.

./npm-install.sh

# Electron's version.
export npm_config_target=20.1.4
# The architecture of Electron, can be ia32 or x64.
export npm_config_arch=x64
export npm_config_target_arch=x64
# Download headers for Electron.
export npm_config_disturl=https://www.electronjs.org/headers
# Tell node-pre-gyp that we are building for Electron.
export npm_config_runtime=electron
# Tell node-pre-gyp to build module from source code.
export npm_config_build_from_source=true
# Install all dependencies, and store cache to ~/.electron-gyp.
HOME=~/.electron-gyp npm install

package.json

{
...
  "scripts": {
    "start": "electron . --ignore-gpu-blacklist",
    "rebuild": "electron-rebuild node-pty"
  },
...
  "dependencies": {
    "electron": "^20.1.4",
    "node-pty": "^0.10.1",
    "xterm": "4.2.0"
  },
  "devDependencies": {
    "electron-rebuild": "^3.2.9"
  }
}

When rebuilding: npm rebuild will get this error

image

Will appreciate your help.

Thank you

@JiangBingLong
Copy link

me too!

@slgluo
Copy link

slgluo commented Oct 10, 2022

i also meet this error

@yaoyuanrong
Copy link

how to resolve this question?

@yaoyuanrong
Copy link

me too!

你解决这个问题了吗?

@JiangBingLong
Copy link

me too!

你解决这个问题了吗?
使用 node-gyp 手动编译

@yaoyuanrong
Copy link

me too!

你解决这个问题了吗?
使用 node-gyp 手动编译

你的那个binding.gyp的文件能给我看看吗?我这边参考一下,感谢

@xyj404
Copy link

xyj404 commented Nov 24, 2022

me too!

你解决这个问题了吗?
使用 node-gyp 手动编译

你的那个binding.gyp的文件能给我看看吗?我这边参考一下,感谢

You can set GYP_MSVS_VERSION: '2019' to system env variable to solve this problem.

@shokhboz-abdullaev
Copy link

me too!

你解决这个问题了吗?
使用 node-gyp 手动编译

你的那个binding.gyp的文件能给我看看吗?我这边参考一下,感谢

You can set GYP_MSVS_VERSION: '2019' to system env variable to solve this problem.

Thanks so much, it resolved my issue with win-dpapi.

@ngotrongphuc
Copy link

me too!

你解决这个问题了吗?
使用 node-gyp 手动编译

你的那个binding.gyp的文件能给我看看吗?我这边参考一下,感谢

You can set GYP_MSVS_VERSION: '2019' to system env variable to solve this problem.

It works, it really works. After spending a whole day struggling with this problem, I finally solved it just by changing GYP_MSVS_VERSION from 2015 to 2019

@Essam-Harrous
Copy link

I'm still having the same issue, setting GYP_MSVS_version didn't fix it

@JimCSuen
Copy link

I'm still having the same issue, setting GYP_MSVS_version didn't fix it

try this
image

to both system var and user var. then you might need to close your cmd prompt and open a new one. this is helpful to me.

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

No branches or pull requests

9 participants