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 when using node-gyp from yarn command #3020

Open
nabilsafiSTM opened this issue Apr 15, 2024 · 3 comments
Open

error when using node-gyp from yarn command #3020

nabilsafiSTM opened this issue Apr 15, 2024 · 3 comments

Comments

@nabilsafiSTM
Copy link

Hi
I m facing this problem when i run yarn in my project

gyp: Call to 'cmd /c "cd shared && GetCommitHash.bat"' returned exit status 1 while in deps\winpty\src\winpty.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
\node_modules\node-pty
gyp ERR! node -v v16.18.1
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok

Python version 3.10.4

  • Node Version:16.18.1
  • Platform: Windows
@cclauss
Copy link
Contributor

cclauss commented Apr 15, 2024

gyp ERR! node -v v16.18.1
gyp ERR! node-gyp -v v7.1.2

Both of these tools are end-of-life. https://github.com/nodejs/Release/blob/main/README.md

Please proved the command typed and the full error log when opening issues.

@nabilsafiSTM
Copy link
Author

the command typed is : yarn
npm version 10.5.2
node -v: 18.18.2

[4/4] Building fresh packages...
error C:\prj\node_modules\node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: C:\prj\node_modules\node-pty
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@18.18.2 | win32 | x64
gyp info find Python using Python version 3.10.4 found at "C:\Users\tools\python-3.10.4\python.exe"
gyp info find VS using VS2019 (16.11.32228.343) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
(node:9756) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use node --trace-deprecation ... to show where the warning was created)
gyp info spawn C:\Users\python-3.10.4\python.exe
gyp info spawn args [
gyp info spawn args 'C:\prj\node_modules\@npmcli\run-script\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\prj\node_modules\node-pty\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\prj\node_modules\@npmcli\run-script\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\xxxx\AppData\Local\node-gyp\Cache\18.18.2\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\xxx\AppData\Local\node-gyp\Cache\18.18.2',
gyp info spawn args '-Dnode_gyp_dir=C:\prj\node_modules\@npmcli\run-script\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\xxx\\AppData\\Local\\node-gyp\\Cache\\18.18.2\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\prj\node_modules\node-pty',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\prj\node_modules\node-pty\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
'cmd' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'cmd /c "cd shared && GetCommitHash.bat"' returned exit status 1 while in deps\winpty\src\winpty.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\prj\node_modules@npmcli\run-script\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (node:events:517:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\Users\safin\cube2-env\tools\node-18.18.2\node.exe" "C:\prj\node_modules\@npmcli\run-script\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\prj\node_modules\node-pty
gyp ERR! node -v v18.18.2
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@cclauss
Copy link
Contributor

cclauss commented Apr 15, 2024

gyp info using node-gyp@7.1.2


'cmd' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'cmd /c "cd shared && GetCommitHash.bat"' returned exit status 1

Seems strange 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

2 participants