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 during build #309

Closed
SFX123456 opened this issue Mar 28, 2024 · 2 comments
Closed

Error during build #309

SFX123456 opened this issue Mar 28, 2024 · 2 comments
Labels

Comments

@SFX123456
Copy link

hello, i cant run npm run build without facing this error.
PS E:\hjbsdfh\node_modules\tree-sitter-javascript> npm run build

tree-sitter-javascript@0.20.4 build
tree-sitter generate && node-gyp build

gyp info it worked if it ends with ok
gyp info using node-gyp@9.4.0
gyp info using node@20.9.0 | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "-m" hinzufügen.
parser.c
Bibliothek "E:\hjbsdfh\node_modules\tree-sitter-javascript\build\Release\tree_sitter_javascript_binding.lib" und O
bjekt "E:\hjbsdfh\node_modules\tree-sitter-javascript\build\Release\tree_sitter_javascript_binding.exp" werden erstel
lt.
parser.obj : error LNK2001: Nicht aufgelöstes externes Symbol "tree_sitter_javascript_external_scanner_destroy". [E:\hj
bsdfh\node_modules\tree-sitter-javascript\build\tree_sitter_javascript_binding.vcxproj]
parser.obj : error LNK2001: Nicht aufgelöstes externes Symbol "tree_sitter_javascript_external_scanner_deserialize". [E
:\hjbsdfh\node_modules\tree-sitter-javascript\build\tree_sitter_javascript_binding.vcxproj]
parser.obj : error LNK2001: Nicht aufgelöstes externes Symbol "tree_sitter_javascript_external_scanner_create". [E:\hjb
sdfh\node_modules\tree-sitter-javascript\build\tree_sitter_javascript_binding.vcxproj]
parser.obj : error LNK2001: Nicht aufgelöstes externes Symbol "tree_sitter_javascript_external_scanner_scan". [E:\hjbsd
fh\node_modules\tree-sitter-javascript\build\tree_sitter_javascript_binding.vcxproj]
parser.obj : error LNK2001: Nicht aufgelöstes externes Symbol "tree_sitter_javascript_external_scanner_serialize". [E:
hjbsdfh\node_modules\tree-sitter-javascript\build\tree_sitter_javascript_binding.vcxproj]
E:\hjbsdfh\node_modules\tree-sitter-javascript\build\Release\tree_sitter_javascript_binding.node : fatal error LNK1120:
5 nicht aufgelöste Externe [E:\hjbsdfh\node_modules\tree-sitter-javascript\build\tree_sitter_javascript_binding.vcxpro
j]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Nico\AppData\Roaming\nvm\v20.9.0\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:294:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Nico\AppData\Roaming\nvm\v20.9.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build"
gyp ERR! cwd E:\hjbsdfh\node_modules\tree-sitter-javascript
gyp ERR! node -v v20.9.0
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok

its german unfortunately but it basically says there is an unresolved external symbol "tree_sitter_javascript_external_scanner_destroy". [E:\hjbsdfh\node_modules\tree-sitter-javascript\build\tree_sitter_javascript_binding.vcxproj] 5 times

there is my tree_sitter_javascript_binding.vcxproj file. i need to recompile as i get the following error tree-sitter/node-tree-sitter#193

Debug x64 Release x64 {2B00F4D4-8CB6-5DA3-ABE6-EBBC68CF6EEF} Win32Proj tree_sitter_javascript_binding true x64 10.0.19041.0 DynamicLibrary v142 $(ExecutablePath);$(MSBuildProjectDirectory)\..\bin\;$(MSBuildProjectDirectory)\..\bin\ true $(Configuration)\obj\$(ProjectName)\ false true $(SolutionDir)$(Configuration)\ .node .node .node .node $(ProjectName) $(OutDir)\$(ProjectName).node C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\include\node;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\src;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\config;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\openssl\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\uv\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\zlib;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\v8\include;..\src;..\..\node-addon-api;%(AdditionalIncludeDirectories) /Zc:__cplusplus -std:c++17 %(AdditionalOptions) EnableFastChecks true OldStyle 4351;4355;4800;4251;4275;4244;4267;%(DisableSpecificWarnings) true Sync false true false Disabled NotUsing NODE_GYP_MODULE_NAME=tree_sitter_javascript_binding;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;V8_DEPRECATION_WARNINGS;V8_IMMINENT_DEPRECATION_WARNINGS;_GLIBCXX_USE_CXX11_ABI=1;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;NAPI_CPP_EXCEPTIONS;_HAS_EXCEPTIONS=1;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";DEBUG;_DEBUG;V8_ENABLE_CHECKS;%(PreprocessorDefinitions) MultiThreadedDebug true true false Level3 true /LTCG:INCREMENTAL %(AdditionalOptions) kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;DelayImp.lib;"C:\\Users\\Nico\\AppData\\Local\\node-gyp\\Cache\\20.9.0\\x64\\node.lib" /LTCG:INCREMENTAL /ignore:4199 %(AdditionalOptions) node.exe;%(DelayLoadDLLs) true true true $(OutDir)$(ProjectName).node true .node MachineX64 C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\include\node;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\src;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\config;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\openssl\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\uv\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\zlib;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\v8\include;..\src;..\..\node-addon-api;%(AdditionalIncludeDirectories) NODE_GYP_MODULE_NAME=tree_sitter_javascript_binding;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;V8_DEPRECATION_WARNINGS;V8_IMMINENT_DEPRECATION_WARNINGS;_GLIBCXX_USE_CXX11_ABI=1;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;NAPI_CPP_EXCEPTIONS;_HAS_EXCEPTIONS=1;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";DEBUG;_DEBUG;V8_ENABLE_CHECKS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\include\node;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\src;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\config;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\openssl\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\uv\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\zlib;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\v8\include;..\src;..\..\node-addon-api;%(AdditionalIncludeDirectories) /Zc:__cplusplus -std:c++17 %(AdditionalOptions) true OldStyle 4351;4355;4800;4251;4275;4244;4267;%(DisableSpecificWarnings) true Sync Speed true AnySuitable true true true Full NotUsing NODE_GYP_MODULE_NAME=tree_sitter_javascript_binding;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;V8_DEPRECATION_WARNINGS;V8_IMMINENT_DEPRECATION_WARNINGS;_GLIBCXX_USE_CXX11_ABI=1;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;NAPI_CPP_EXCEPTIONS;_HAS_EXCEPTIONS=1;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";%(PreprocessorDefinitions) MultiThreaded false true true false Level3 true /LTCG:INCREMENTAL %(AdditionalOptions) kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;DelayImp.lib;"C:\\Users\\Nico\\AppData\\Local\\node-gyp\\Cache\\20.9.0\\x64\\node.lib" /LTCG:INCREMENTAL /ignore:4199 %(AdditionalOptions) node.exe;%(DelayLoadDLLs) true true true $(OutDir)$(ProjectName).node true .node MachineX64 C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\include\node;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\src;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\config;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\openssl\openssl\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\uv\include;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\zlib;C:\Users\Nico\AppData\Local\node-gyp\Cache\20.9.0\deps\v8\include;..\src;..\..\node-addon-api;%(AdditionalIncludeDirectories) NODE_GYP_MODULE_NAME=tree_sitter_javascript_binding;USING_UV_SHARED=1;USING_V8_SHARED=1;V8_DEPRECATION_WARNINGS=1;V8_DEPRECATION_WARNINGS;V8_IMMINENT_DEPRECATION_WARNINGS;_GLIBCXX_USE_CXX11_ABI=1;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_HAS_EXCEPTIONS=0;OPENSSL_NO_PINSHARED;OPENSSL_THREADS;NAPI_CPP_EXCEPTIONS;_HAS_EXCEPTIONS=1;BUILDING_NODE_EXTENSION;HOST_BINARY="node.exe";%(PreprocessorDefinitions);%(PreprocessorDefinitions) $(IntDir)\bindings\node\binding.obj $(IntDir)\src\parser.obj {B6CAB838-2818-82DF-FEE6-DF54B7BDFC07} false
@SFX123456 SFX123456 added the bug label Mar 28, 2024
@SFX123456
Copy link
Author

SFX123456 commented Mar 29, 2024

i tried deleting everything build wise of treesitter bash running npm run build and then npm run install. it worked. when switching grammar.js and changing the name of
module.exports = grammar({
name: 'bash',
to javascript it still compiles but it doesnt give out anything that makes sense. the grammar seems broken

@SFX123456
Copy link
Author

thought the scanner.c file was also auto generated. switched it and it works now when switching names etc wihtin treesitter-bash :)

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

No branches or pull requests

1 participant