microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.46k stars 235 forks source link

node-pty doesn't build #479

Closed y-nk closed 2 years ago

y-nk commented 3 years ago

Environment details

Issue description

node-pty doesn't build with

Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: ~/test/node_modules/node-pty
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.4.0 | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
(node:15313) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args   '/Users/julien/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '~/test/node_modules/node-pty/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/julien/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/julien/Library/Caches/node-gyp/16.4.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/julien/Library/Caches/node-gyp/16.4.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/julien/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/julien/Library/Caches/node-gyp/16.4.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=~/test/node_modules/node-pty',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/pty/src/unix/pty.o
In file included from ../src/unix/pty.cc:20:
In file included from ../../nan/nan.h:56:
In file included from /Users/julien/Library/Caches/node-gyp/16.4.0/include/node/node.h:63:
In file included from /Users/julien/Library/Caches/node-gyp/16.4.0/include/node/v8.h:30:
/Users/julien/Library/Caches/node-gyp/16.4.0/include/node/v8-internal.h:454:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
            !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                ~~~~~^~~~~~~~~~~
                                     remove_cv
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:776:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
                                                 ^
1 error generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/julien/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.5.0
gyp ERR! command "/Users/julien/.nvm/versions/node/v16.4.0/bin/node" "/Users/julien/.nvm/versions/node/v16.4.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ~/test/node_modules/node-pty
gyp ERR! node -v v16.4.0
Tyriar commented 3 years ago

Maybe an issue with new node? Latest I've built it with is 14 so far

y-nk commented 3 years ago

@Tyriar Indeed, tested with node 14 and working. I think the issue comes from node-gyp since i got the same issue with node-sass.

thegamerx1 commented 3 years ago

i have same issue with node 14.15

JhaAman commented 2 years ago

Any news on supporting node-pty on node 16?

Tyriar commented 2 years ago

@JhaAman we'll be forced to do it for VS Code eventually when Electron moves to the same version of V8 as node 16.

Tyriar commented 2 years ago

duplicate of https://github.com/microsoft/node-pty/issues/438