node.jswindowsmingw-w64msys2

How to tell if node in windows is the msvc version or the mingw's version?


To see the C++ compatibility, if it's gnu, or msvc in windows. I know the platform is both win32, but depending on how it was compiled the ABI interface changes a little bit.

I tried node -v, but it just gives you a number, not anything on how it was built.


Solution

  • Just found out.

    const os = require('os');
    console.log(os.type());
    

    mingw-based will return MINGW32_NT-10.0 (regardless of it being 64 or 32 bit)

    msvc will return Windows_NT