You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the instructions at https://github.com/nodejs/node-gyp#on-windows to install node-gyp on Windows. I already have Visual Studio Community 2022 installed with "Desktop development with C++" before so I ran npm config set msvs_version 2022 instead of npm config set msvs_version 2017. The installation was successful and my Node.js is also on the latest LTS version (v16.14.0). I tried to install simdjson but I got this compilation error:
D:\Apps\JishinAlert\Discord>npm install simdjson --save
npm ERR! code 1
npm ERR! path D:\Apps\JishinAlert\Discord\node_modules\simdjson
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR! main.cpp
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi-inl.h(2155,9): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! simdjson.cpp
npm ERR! bindings.cpp
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi-inl.h(2155,9): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(21,54): error C2440: '<function-style-cast>': cannot convert from 'simdjson::dom::element' to 'simdjson::dom::array' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(21,54): message : No constructor could take the source type, or constructor overload resolution was ambiguous [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(21,31): error C2143: syntax error: missing ';' before ':' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(21,7): error C2440: '<function-style-cast>': cannot convert from 'simdjson::dom::element' to 'simdjson::dom::array' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(21,7): message : No constructor could take the source type, or constructor overload resolution was ambiguous [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(21,52): error C2143: syntax error: missing ';' before ')' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(29,47): error C2440: '<function-style-cast>': cannot convert from 'simdjson::dom::element' to 'simdjson::dom::object' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(29,47): message : No constructor could take the source type, or constructor overload resolution was ambiguous [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(29,7): error C3531: 'field': a symbol whose type contains 'auto' must have an initializer [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(29,23): error C2143: syntax error: missing ';' before ':' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(29,7): error C2440: '<function-style-cast>': cannot convert from 'simdjson::dom::element' to 'simdjson::dom::object' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(29,7): message : No constructor could take the source type, or constructor overload resolution was ambiguous [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(29,45): error C2143: syntax error: missing ';' before ')' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(32,66): error C2660: 'simdjsonnode::makeJSONObject': function does not take 1 arguments [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(15,27): message : see declaration of 'simdjsonnode::makeJSONObject' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(32,12): error C2672: 'Napi::Object::Set': no matching overloaded function found [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(32,67): error C2780: 'void Napi::Object::Set(uint32_t,const ValueType &)': expects 2 arguments - 1 provided [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi.h(682): message : see declaration of 'Napi::Object::Set' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(32,67): error C2780: 'void Napi::Object::Set(const std::string &,const ValueType &)': expects 2 arguments - 1 provided [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi.h(645): message : see declaration of 'Napi::Object::Set' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(32,67): error C2780: 'void Napi::Object::Set(const char *,const ValueType &)': expects 2 arguments - 1 provided [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi.h(638): message : see declaration of 'Napi::Object::Set' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(32,67): error C2780: 'void Napi::Object::Set(Napi::Value,const ValueType &)': expects 2 arguments - 1 provided [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi.h(631): message : see declaration of 'Napi::Object::Set' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(32,67): error C2780: 'void Napi::Object::Set(napi_value,const ValueType &)': expects 2 arguments - 1 provided [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi.h(624): message : see declaration of 'Napi::Object::Set' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(37,37): error C2440: 'initializing': cannot convert from 'simdjson::dom::element' to 'std::basic_string_view<char,std::char_traits<char>>' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(37,37): message : No constructor could take the source type, or constructor overload resolution was ambiguous [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(41,53): error C2664: 'Napi::Value Napi::Value::From<int64_t>(napi_env,const T &)': cannot convert argument 2 from 'simdjson::dom::element' to 'const T &' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=int64_t
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(41,53): message : Reason: cannot convert from 'simdjson::dom::element' to 'const T' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=int64_t
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(41,46): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi-inl.h(926,14): message : see declaration of 'Napi::Value::From' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(43,54): error C2664: 'Napi::Value Napi::Value::From<uint64_t>(napi_env,const T &)': cannot convert argument 2 from 'simdjson::dom::element' to 'const T &' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=uint64_t
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(43,54): message : Reason: cannot convert from 'simdjson::dom::element' to 'const T' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=uint64_t
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(43,47): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi-inl.h(926,14): message : see declaration of 'Napi::Value::From' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(45,52): error C2664: 'Napi::Value Napi::Value::From<double>(napi_env,const T &)': cannot convert argument 2 from 'simdjson::dom::element' to 'const T &' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=double
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(45,52): message : Reason: cannot convert from 'simdjson::dom::element' to 'const T' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=double
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(45,45): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi-inl.h(926,14): message : see declaration of 'Napi::Value::From' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(47,50): error C2664: 'Napi::Value Napi::Value::From<bool>(napi_env,const T &)': cannot convert argument 2 from 'simdjson::dom::element' to 'const T &' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=bool
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(47,50): message : Reason: cannot convert from 'simdjson::dom::element' to 'const T' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! with
npm ERR! [
npm ERR! T=bool
npm ERR! ]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(47,43): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\node-addon-api\napi-inl.h(926,14): message : see declaration of 'Napi::Value::From' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(85,71): error C2664: 'Napi::Value simdjsonnode::findKeyPath(Napi::Env,std::vector<std::string,std::allocator<std::string>>,simdjson::dom::element)': cannot convert argument 3 from 'simdjson::simdjson_result<simdjson::dom::element>' to 'simdjson::dom::element' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(85,51): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(75,27): message : see declaration of 'simdjsonnode::findKeyPath' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(88,64): error C2664: 'Napi::Value simdjsonnode::findKeyPath(Napi::Env,std::vector<std::string,std::allocator<std::string>>,simdjson::dom::element)': cannot convert argument 3 from 'simdjson::simdjson_result<simdjson::dom::element>' to 'simdjson::dom::element' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(88,55): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(75,27): message : see declaration of 'simdjsonnode::findKeyPath' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(118,50): error C2664: 'Napi::Value simdjsonnode::makeJSONObject(Napi::Env,simdjson::dom::element)': cannot convert argument 2 from 'simdjson::simdjson_result<simdjson::dom::element>' to 'simdjson::dom::element' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(118,44): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! D:\Apps\JishinAlert\Discord\node_modules\simdjson\simdjson\bindings.cpp(15,27): message : see declaration of 'simdjsonnode::makeJSONObject' [D:\Apps\JishinAlert\Discord\node_modules\simdjson\build\simdjson.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at "C:\Users\Admin\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp info find VS using VS2022 (17.0.32002.185) found at:
npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Admin\AppData\Local\Programs\Python\Python310\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'D:\\Apps\\JishinAlert\\Discord\\node_modules\\simdjson\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\Admin\\AppData\\Local\\node-gyp\\Cache\\16.14.0\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\Admin\\AppData\\Local\\node-gyp\\Cache\\16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\Admin\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.14.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\\Apps\\JishinAlert\\Discord\\node_modules\\simdjson',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'D:\\Apps\\JishinAlert\\Discord\\node_modules\\simdjson\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! 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"
npm ERR! gyp ERR! cwd D:\Apps\JishinAlert\Discord\node_modules\simdjson
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Local\npm-cache\_logs\2022-03-05T02_09_31_907Z-debug-0.log
can anyone help me with this? I don't have lots of C++ knowledge so I can't fix that by myself
I'm using Visual Studio Community 2022 v17.0.3 with Desktop development with C++
The text was updated successfully, but these errors were encountered:
I followed the instructions at https://github.com/nodejs/node-gyp#on-windows to install
node-gyp
on Windows. I already have Visual Studio Community 2022 installed with "Desktop development with C++" before so I rannpm config set msvs_version 2022
instead ofnpm config set msvs_version 2017
. The installation was successful and my Node.js is also on the latest LTS version (v16.14.0). I tried to install simdjson but I got this compilation error:can anyone help me with this? I don't have lots of C++ knowledge so I can't fix that by myself
I'm using Visual Studio Community 2022 v17.0.3 with Desktop development with C++
The text was updated successfully, but these errors were encountered: