Skip to content

Unable to build on windows #75

Open
@ninjaaquaoutlook

Description

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?

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions