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 C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types #981

Open
oalfroukh opened this issue Nov 25, 2024 · 0 comments

Comments

@oalfroukh
Copy link

oalfroukh commented Nov 25, 2024

Hi,

  • I'm not sure if this is the right repo to report for this issue as I'm not sure who is responsible about it

  • I was using electron v30.5.0 and when I tried to upgrade it to use v33.2.0 I got the below error wehn using electron-builder --config ./electron-builder.json --win --x64

  • Trying to "overrides" "nan" to be 2.22.0 has no affect

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64\CL.exe /c /I"C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node" /I"C:\Users\oalfroukh\.electron-gyp\33.2.0\src" /I"C:\Users\oalfroukh\.electron-gyp\33.2.0\deps\openssl\config" /I"C:\Users\oalfroukh\.electron-gyp\33.2.0\deps\openssl\openssl\include" /I"C:\Users\oalfroukh\.electron-gyp\33.2.0\deps\uv\include" /I"C:\Users\oalfroukh\.electron-gyp\33.2.0\deps\zlib" /I"C:\Users\oalfroukh\.electron-gyp\33.2.0\deps\v8\include" /I..\..\..\node_modules\nan /Z7 /nologo /W3 /WX- /diagnostics:column /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=helpers /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D _GLIBCXX_USE_CXX11_ABI=1 /D ELECTRON_ENSURE_CONFIG_GYPI /D USING_ELECTRON_CONFIG_GYPI /D V8_COMPRESS_POINTERS /D V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE /D V8_31BIT_SMIS_ON_64BIT_ARCH /D V8_ENABLE_SANDBOX /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D OPENSSL_NO_PINSHARED /D OPENSSL_THREADS /D OPENSSL_NO_ASM /D BUILDING_NODE_EXTENSION /D "HOST_BINARY=\"node.exe\"" /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\helpers\\win32\Helpers.obj" /Fd"Release\obj\helpers\vc143.pdb" /external:W3 /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:__cplusplus -std:c++20 ..\win32\Helpers.cc
  Helpers.cc
C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,23): error C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]
  (compiling source file '../win32/Helpers.cc')
  C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-message.h(64,3):
  could be 'v8::ScriptOrigin::ScriptOrigin(v8::Local<v8::Value>,int,int,bool,int,v8::Local<v8::Value>,bool,bool,bool,v8::Local<v8::Data>)'
        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,23):      
        'v8::ScriptOrigin::ScriptOrigin(v8::Local<v8::Value>,int,int,bool,int,v8::Local<v8::Value>,bool,bool,bool,v8::Local<v8::Data>)': cannot convert argument 1 from 'v8::Isolate *' to 'v8::Local<v8::Value>'
                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                'v8::Local<v8::Value>::Local': no overloaded function could convert all the argument types
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(424,1):
                        could be 'v8::Local<v8::Value>::Local(v8::Local<v8::Value> &&)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                                'v8::Local<v8::Value>::Local(v8::Local<v8::Value> &&)': cannot convert argument 1 from 'v8::Isolate *' to 'v8::Local<v8::Value> &&'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                                        Reason: cannot convert from 'v8::Isolate *' to 'v8::Local<v8::Value>'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                                        Conversion requires a second user-defined-conversion operator or constructor
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(424,1):
                        or       'v8::Local<v8::Value>::Local(const v8::Local<v8::Value> &)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                                'v8::Local<v8::Value>::Local(const v8::Local<v8::Value> &)': cannot convert argument 1 from 'v8::Isolate *' to 'const v8::Local<v8::Value> &'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                                        Reason: cannot convert from 'v8::Isolate *' to 'const v8::Local<v8::Value>'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                                        Conversion requires a second user-defined-conversion operator or constructor
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(258,3):
                        or       'v8::Local<v8::Value>::Local(void)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                                'v8::Local<v8::Value>::Local': function does not take 1 arguments
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(261,3):
                        or       'v8::Local<v8::Value>::Local(v8::Local<S>)'
                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,47):
                        while trying to match the argument list '(v8::Isolate *)'
  C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,23):
  while trying to match the argument list '(v8::Isolate *, v8::Local<v8::Value>)'

C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,23): error C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]
  (compiling source file '../win32/Helpers.cc')
  C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-message.h(64,3):
  could be 'v8::ScriptOrigin::ScriptOrigin(v8::Local<v8::Value>,int,int,bool,int,v8::Local<v8::Value>,bool,bool,bool,v8::Local<v8::Data>)'
        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,23):      
        'v8::ScriptOrigin::ScriptOrigin(v8::Local<v8::Value>,int,int,bool,int,v8::Local<v8::Value>,bool,bool,bool,v8::Local<v8::Data>)': cannot convert argument 1 from 'v8::Isolate *' to 'v8::Local<v8::Value>'
                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                'v8::Local<v8::Value>::Local': no overloaded function could convert all the argument types
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(424,1):
                        could be 'v8::Local<v8::Value>::Local(v8::Local<v8::Value> &&)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                                'v8::Local<v8::Value>::Local(v8::Local<v8::Value> &&)': cannot convert argument 1 from 'v8::Isolate *' to 'v8::Local<v8::Value> &&'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                                        Reason: cannot convert from 'v8::Isolate *' to 'v8::Local<v8::Value>'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                                        Conversion requires a second user-defined-conversion operator or constructor
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(424,1):
                        or       'v8::Local<v8::Value>::Local(const v8::Local<v8::Value> &)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                                'v8::Local<v8::Value>::Local(const v8::Local<v8::Value> &)': cannot convert argument 1 from 'v8::Isolate *' to 'const v8::Local<v8::Value> &'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                                        Reason: cannot convert from 'v8::Isolate *' to 'const v8::Local<v8::Value>'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                                        Conversion requires a second user-defined-conversion operator or constructor
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(258,3):
                        or       'v8::Local<v8::Value>::Local(void)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                                'v8::Local<v8::Value>::Local': function does not take 1 arguments
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(261,3):
                        or       'v8::Local<v8::Value>::Local(v8::Local<S>)'
                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,47):
                        while trying to match the argument list '(v8::Isolate *)'
  C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,23):
  while trying to match the argument list '(v8::Isolate *, v8::Local<v8::Value>, T)'
          with
          [
              T=int
          ]

C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,23): error C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]
  (compiling source file '../win32/Helpers.cc')
  C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-message.h(64,3):
  could be 'v8::ScriptOrigin::ScriptOrigin(v8::Local<v8::Value>,int,int,bool,int,v8::Local<v8::Value>,bool,bool,bool,v8::Local<v8::Data>)'
        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,23):      
        'v8::ScriptOrigin::ScriptOrigin(v8::Local<v8::Value>,int,int,bool,int,v8::Local<v8::Value>,bool,bool,bool,v8::Local<v8::Data>)': cannot convert argument 1 from 'v8::Isolate *' to 'v8::Local<v8::Value>'
                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                'v8::Local<v8::Value>::Local': no overloaded function could convert all the argument types
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(424,1):
                        could be 'v8::Local<v8::Value>::Local(v8::Local<v8::Value> &&)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                                'v8::Local<v8::Value>::Local(v8::Local<v8::Value> &&)': cannot convert argument 1 from 'v8::Isolate *' to 'v8::Local<v8::Value> &&'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                                        Reason: cannot convert from 'v8::Isolate *' to 'v8::Local<v8::Value>'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                                        Conversion requires a second user-defined-conversion operator or constructor
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(424,1):
                        or       'v8::Local<v8::Value>::Local(const v8::Local<v8::Value> &)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                                'v8::Local<v8::Value>::Local(const v8::Local<v8::Value> &)': cannot convert argument 1 from 'v8::Isolate *' to 'const v8::Local<v8::Value> &'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                                        Reason: cannot convert from 'v8::Isolate *' to 'const v8::Local<v8::Value>'
                                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                                        Conversion requires a second user-defined-conversion operator or constructor
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(258,3):
                        or       'v8::Local<v8::Value>::Local(void)'
                                C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                                'v8::Local<v8::Value>::Local': function does not take 1 arguments
                        C:\Users\oalfroukh\.electron-gyp\33.2.0\include\node\v8-local-handle.h(261,3):
                        or       'v8::Local<v8::Value>::Local(v8::Local<S>)'
                        C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,47):
                        while trying to match the argument list '(v8::Isolate *)'
  C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,23):
  while trying to match the argument list '(v8::Isolate *, v8::Local<v8::Value>, T, T)'
          with
          [
              T=int
          ]

C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\win32\Helpers.cc(58,16): warning C4312: 'type cast': conversion from 'unsigned long' to 'HWND' of greater size [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]
Done Building Project "C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\binding.sln" (default targets) -- FAILED.

Build FAILED.

"C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\binding.sln" (default target) (1) ->
"C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj" (default target) (2) ->
(ClCompile target) ->
  C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\win32\Helpers.cc(58,16): warning C4312: 'type cast': conversion from 'unsigned long' to 'HWND' of greater size [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]


"C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\binding.sln" (default target) (1) ->
"C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj" (default target) (2) ->
(ClCompile target) ->
  C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(36,23): error C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]
  C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(40,23): error C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]
  C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\node_modules\nan\nan_scriptorigin.h(47,23): error C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types [C:\Users\oalfroukh\Desktop\electron_samples\electron-quick-start-main\electron-quick-start-main\native\helpers\build\helpers.vcxproj]

    1 Warning(s)
    3 Error(s)

BR,

@oalfroukh oalfroukh changed the title V8 will stop providing access to hidden prototype (i.e. JSGlobalObject). Use This() instead error C2665: 'v8::ScriptOrigin::ScriptOrigin': no overloaded function could convert all the argument types Nov 27, 2024
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

1 participant