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

Some examples fail on msys2/mingw #445

Open
Kreijstal opened this issue Mar 23, 2024 · 0 comments
Open

Some examples fail on msys2/mingw #445

Kreijstal opened this issue Mar 23, 2024 · 0 comments

Comments

@Kreijstal
Copy link

It is quite fortunate that most examples run, Here are all the tests:

passed: C:\a\node-addon-examples\src\1-getting-started\1_hello_world\nan
passed: C:\a\node-addon-examples\src\1-getting-started\1_hello_world\napi
passed: C:\a\node-addon-examples\src\1-getting-started\1_hello_world\node-addon-api
passed: C:\a\node-addon-examples\src\1-getting-started\1_hello_world\node-addon-api-addon-class
passed: C:\a\node-addon-examples\src\1-getting-started\2_function_arguments\nan
passed: C:\a\node-addon-examples\src\1-getting-started\2_function_arguments\napi
passed: C:\a\node-addon-examples\src\1-getting-started\2_function_arguments\node-addon-api
passed: C:\a\node-addon-examples\src\1-getting-started\3_callbacks\nan
passed: C:\a\node-addon-examples\src\1-getting-started\3_callbacks\napi
passed: C:\a\node-addon-examples\src\1-getting-started\3_callbacks\node-addon-api
passed: C:\a\node-addon-examples\src\1-getting-started\4_object_factory\nan
passed: C:\a\node-addon-examples\src\1-getting-started\4_object_factory\napi
passed: C:\a\node-addon-examples\src\1-getting-started\4_object_factory\node-addon-api
passed: C:\a\node-addon-examples\src\1-getting-started\5_function_factory\nan
passed: C:\a\node-addon-examples\src\1-getting-started\5_function_factory\napi
passed: C:\a\node-addon-examples\src\1-getting-started\5_function_factory\node-addon-api
passed: C:\a\node-addon-examples\src\1-getting-started\6_object_wrap\nan
passed: C:\a\node-addon-examples\src\1-getting-started\6_object_wrap\napi
passed: C:\a\node-addon-examples\src\1-getting-started\6_object_wrap\node-addon-api
passed: C:\a\node-addon-examples\src\1-getting-started\7_factory_wrap\nan
passed: C:\a\node-addon-examples\src\1-getting-started\7_factory_wrap\napi
passed: C:\a\node-addon-examples\src\1-getting-started\7_factory_wrap\node-addon-api
passed: C:\a\node-addon-examples\src\1-getting-started\a-first-project\node-addon-api
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\8_passing_wrapped\nan
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\8_passing_wrapped\napi
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\8_passing_wrapped\node-addon-api
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\array_buffer_to_native\node-addon-
api
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\object-template-demo\nan
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\object-template-demo\napi
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\object-wrap-demo\node-addon-api
passed: C:\a\node-addon-examples\src\2-js-to-native-conversion\typed_array_to_native\node-addon-a
pi
passed: C:\a\node-addon-examples\src\3-context-awareness\napi
passed: C:\a\node-addon-examples\src\3-context-awareness\node_10
passed: C:\a\node-addon-examples\src\5-async-work\async_pi_estimate\nan
passed: C:\a\node-addon-examples\src\5-async-work\async_pi_estimate\node-addon-api
passed: C:\a\node-addon-examples\src\5-async-work\async_work_promise\napi
passed: C:\a\node-addon-examples\src\5-async-work\async_work_promise\node-addon-api
passed: C:\a\node-addon-examples\src\5-async-work\async_work_thread_safe_function\napi
passed: C:\a\node-addon-examples\src\5-async-work\call-js-from-async-worker-execute\node-addon-ap
i
passed: C:\a\node-addon-examples\src\5-async-work\napi-asyncworker-example\node-addon-api
passed: C:\a\node-addon-examples\src\6-threadsafe-function\promise-callback-demo\node-addon-api
passed: C:\a\node-addon-examples\src\6-threadsafe-function\thread_safe_function_round_trip\napi
passed: C:\a\node-addon-examples\src\7-events\emit_event_from_cpp\node-addon-api
passed: C:\a\node-addon-examples\src\7-events\inherits_from_event_emitter\node-addon-api
failed to install:
    C:\a\node-addon-examples\src\4-references-and-handle-scope\function-reference-demo\node-addon
-api
    C:\a\node-addon-examples\src\5-async-work\async-iterator\node-addon-api
    C:\a\node-addon-examples\src\6-threadsafe-function\threadsafe-async-iterator\node-addon-api
    C:\a\node-addon-examples\src\6-threadsafe-function\thread_safe_function_counting\node-addon-a
pi
    C:\a\node-addon-examples\src\6-threadsafe-function\thread_safe_function_with_object_wrap\node
-addon-api
    C:\a\node-addon-examples\src\6-threadsafe-function\typed_threadsafe_function\node-addon-api
    C:\a\node-addon-examples\src\8-tooling\build_with_cmake\napi
    C:\a\node-addon-examples\src\8-tooling\build_with_cmake\node-addon-api
    C:\a\node-addon-examples\src\8-tooling\typescript_with_addon\node-addon-api

But everything relying on cmake-js refuses to ackownledge the existence of mingw compiler. There are many benefits to using mingw compilers. Besides, they are open source!

testing: C:\a\node-addon-examples\src\8-tooling\build_with_cmake\node-addon-api
ERR! find VS
ERR! find VS msvs_version not set from command line or npm config
ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
ERR! find VS
ERR! find VS **************************************************************
ERR! find VS You need to install the latest version of Visual Studio
ERR! find VS including the "Desktop development with C++" workload.
ERR! find VS For more information consult the documentation at:
ERR! find VS https://github.com/nodejs/node-gyp#on-windows
ERR! find VS **************************************************************
ERR! find VS
ERR! OMG Could not find any Visual Studio installation to use
ERR! OMG Could not find any Visual Studio installation to use
npm ERR! code 1
npm ERR! path C:\a\node-addon-examples\src\8-tooling\build_with_cmake\node-addon-api
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c cmake-js compile

npm ERR! A complete log of this run can be found in: C:\Users\topkek\AppData\Local\npm-cache\_logs\2024-03-23T14_50_50_859Z-debug-0.log
Error: Command failed: npm install
ERR! find VS
ERR! find VS msvs_version not set from command line or npm config
ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
ERR! find VS
ERR! find VS **************************************************************
ERR! find VS You need to install the latest version of Visual Studio
ERR! find VS including the "Desktop development with C++" workload.
ERR! find VS For more information consult the documentation at:
ERR! find VS https://github.com/nodejs/node-gyp#on-windows
ERR! find VS **************************************************************
ERR! find VS
ERR! OMG Could not find any Visual Studio installation to use
ERR! OMG Could not find any Visual Studio installation to use
npm ERR! code 1
npm ERR! path C:\a\node-addon-examples\src\8-tooling\build_with_cmake\node-addon-api
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c cmake-js compile
@Kreijstal Kreijstal changed the title Some examples fail on msys2 Some examples fail on msys2/mingw Mar 23, 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