Closed mpavich2 closed 2 months ago
Do you have a code example of what you are trying to do? This package itself doesn't have an npm start
command.
Sorry meant to come back and close this. Took me a while to figure it out. It was either user error or an electron thing and this is what I did to fix it for those who come across similar issues.
Electron + native node modules are tricky to work with (at least for me being new to Electron) I tried to follow the readme here, but kept having issues with it: https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules
I ended up switching electron project templates to a basic electron-react-typescript project rather than the one I had before. Then with this project setup I followed this readme Installing it under the release package.json seemed to have done the trick.
Hopefully this helps anyone in the future if they have a similar problem and happens to be using electron
Could very well be user error, or the use of electron potentially as i'm new to it. Install seemed to have worked fine. Get this error on running though. Any ideas?
› IrSdkNodeBindings.cpp C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan.h(208,16): error C2955: 'Nan::CopyablePersistentTraits': use of class template requires template argument list [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan.h(208,40): error C2143: syntax error: missing ',' before '<' [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan.h(688,39): warning C4996: 'v8::Isolate::IdleNotificationDeadline': Use MemoryPressureNotification() to influence the GC schedule. [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan.h(2548,8): error C2665: 'v8::ObjectTemplate::SetAccessor': no overloaded function could convert all the argument types [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan.h(2594,8): error C2665: 'v8::ObjectTemplate::SetAccessor': no overloaded function could convert all the argument types [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan.h(2638,15): warning C4996: 'v8::Object::SetAccessor': Use SetNativeDataProperty instead [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan.h(2714,56): warning C4996: 'v8::NamedPropertyHandlerConfiguration::NamedPropertyHandlerConfiguration': Provide interceptor callbacks with new signatures instead (NamedPropertyXxxCallback) [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan_scriptorigin.h(19,23): warning C4996: 'v8::ScriptOrigin::ScriptOrigin': Use constructor without the isolate. [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan_scriptorigin.h(23,23): warning C4996: 'v8::ScriptOrigin::ScriptOrigin': Use constructor without the isolate. [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] C:\Users\xxx\Dev\MyOverlay\node_modules\nan\nan_scriptorigin.h(30,23): warning C4996: 'v8::ScriptOrigin::ScriptOrigin': Use constructor without the isolate. [C:\Users\xxx\Dev\MyOverlay\node_modules\iracing-sdk-js\build\IrSdkNodeBindings.vcxproj] Error: 'C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe' failed with exit code: 1 at ChildProcess.onExit (C:\Users\xxx\Dev\MyOverlay\node_modules\node-gyp\lib\build.js:203:23) at ChildProcess.emit (node:events:519:28) at ChildProcess._handle.onexit (node:internal/child_process:294:12)
Node v21.7.3 npm v10.5.0 Also followed node-gyp instructions. Any ideas or help would be greatly appreciated!