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

Unable to build on windows #75

Open
ninjaaquaoutlook opened this issue Dec 7, 2024 · 1 comment
Open

Unable to build on windows #75

ninjaaquaoutlook opened this issue Dec 7, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@ninjaaquaoutlook
Copy link

When trying to npm install on a freshly cloned repo on windows 11, I got below error:

198 error gyp ERR! build error 
198 error gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
198 error gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
198 error gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
198 error gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
198 error gyp ERR! System Windows_NT 10.0.22631
198 error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
198 error gyp ERR! cwd D:\Test\vscode-teal\node_modules\tree-sitter-teal
198 error gyp ERR! node -v v18.17.1
198 error gyp ERR! node-gyp -v v9.3.1
198 error gyp ERR! not ok

I tried to deleting the node_modules folder and package-lock.json file and did again, but got the same result.
I also tried use yarn install instead, same error but a bit more error log info:

  binding.cc
  parser.c
  scanner.c
  win_delay_load_hook.cc
     Creating library D:\Test\vscode-teal\node_modules\tree-sitter-teal\build\Release\tree_sitter_teal_binding.lib and object D:\Test\vscode-teal\node_modules\tree-sitter-teal\build\Release\tree_sitter_teal_binding.exp
binding.obj : error LNK2001: unresolved external symbol tree_sitter_Teal [D:\Test\vscode-teal\node_modules\tree-sitter-teal\build\tree_sitter_teal_binding.vcxproj]
D:\Test\vscode-teal\node_modules\tree-sitter-teal\build\Release\tree_sitter_teal_binding.node : fatal error LNK1120: 1 unresolved externals [D:\Test\vscode-teal\node_modules\tree-sitter-teal\build\tree_sitter_teal_binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT 10.0.22631
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Test\vscode-teal\node_modules\tree-sitter-teal
gyp ERR! node -v v18.17.1
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok

Any insights?

@ninjaaquaoutlook
Copy link
Author

I downloaded the tree-sitter-teal-0.0.4 as an local dependency and changed all tree_sitter_Teal to tree_sitter_teal. npm install works for me now.

@pdesaulniers pdesaulniers added the help wanted Extra attention is needed label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants