microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.43k stars 232 forks source link

Add clang setting for macos to fix install issues with electron >=20 #563

Closed npezza93 closed 1 year ago

npezza93 commented 1 year ago

Experiencing the following error when install node-pay on >= 20. Adding the clang version resolves the issue. You can recreate this issue using electron-builder and install-app-deps.

   npm ERR! /Users/nick/.electron-gyp/21.0.1/include/node/v8-maybe.h:106:45: error: no template named 'is_lvalue_reference_v' in namespace 'std'; did you mean 'is_lvalue_reference'?
    npm ERR!   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
    npm ERR!                                        ~~~~~^~~~~~~~~~~~~~~~~~~~~
    npm ERR!                                             is_lvalue_reference
LabhanshAgrawal commented 1 year ago

@Tyriar can you please review this? It's blocking us from updating to electron v20+. I've tested it with electron v20 and v21 and it's working. Thanks

deepak1556 commented 1 year ago

C++17 is required by the v8 headers shipped with Electron >=20, the module itself does not require it. The relevant compiler flags should be added to common.gypi shipped with the electron headers. Please use electron-rebuild as workaround until this is addressed in upstream Electron.