node-talib
node-talib copied to clipboard
Support for node v16
Install fails on node v16.0.0. Downgrading to v14 worked. Can you please update to support node 16? Using M1 Mac. Thank you!
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/talib/src/talib.o
In file included from ../src/talib.cpp:28:
In file included from /Users/<user>/Library/Caches/node-gyp/16.0.0/include/node/node.h:63:
In file included from /Users/<user>/Library/Caches/node-gyp/16.0.0/include/node/v8.h:30:
/Users/<user>/Library/Caches/node-gyp/16.0.0/include/node/v8-internal.h:452: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
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:715:50: note: 'remove_cv' declared here
template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
^
../src/talib.cpp:85:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
callback->Call(1, argv);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/talib.cpp:95:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
callback->Call(1, argv);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
../src/talib.cpp:546:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
callback->Call(2, argv);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Local<v8::Value>
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'
# define NAN_DEPRECATED __attribute__((deprecated))
^
3 warnings and 1 error generated.
make: *** [Release/obj.target/talib/src/talib.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/<user>/.nvm/versions/node/v16.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:365:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 21.4.0
gyp ERR! command "/Users/<user>/.nvm/versions/node/v16.0.0/bin/node" "/Users/<user>/.nvm/versions/node/v16.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build"
I think it is time to rewrite with a better parallelization and more of better JS conventions.
Is there any workaround for this?
Following worked for me with v16.15.0
export CXXFLAGS="--std=c++17" && npm install
Updates to my previous post, The solution I posted works for ec2 instance (or where we have access to terminal), but now I have to deploy on environment where I do not have access...
How we can build this lib for node V16.X , as I have to deploy this on Lambda function with V16.x. I am happy to contribute on this.
Are we open to breaking changes? or backwards compatibility is important?
Hi I am open to breaking changes, backwards compatibility i.e support for earlier version of nodejs is not required.
Sounds good. Quickest will be to keep to the current spec, but I'll see when I can find time to make the changes for v16.x+
would be great to get it working on node 16 and even 18..
it worked on 14 but soon some hosting services and other packages will drop support for 14 and that will become a big issue :(
Yes, one of these days, I will set some time a side and redo this library. Donations are welcome.
@oransel unfortunatley node 16 is the minimum for my program for other deps ! now talib library broke and totally stuck ! .. would greatly appreciate it if you build for v16 or let us know what is involved on this upgrade ! awesome work and thank you
Yes, one of these days, I will set some time a side and redo this library. Donations are welcome.
If you could kindly add information on the README file on how to solve this sort of issue maybe other devs could contribute / help?
That would be ace 🚀
Try the latest version and let me know if this helps