Tag: node gyp

NodeJS – 无法打开包含文件:'unistd.h':

我正在使用VisualStudio 2012并在windows 7机器上运行。 我想执行make all在我的Windows机器下的命令。 为此,我安装了Make for Windows 。 此外,我想编译节点库talib 。 我打开make文件来执行由nodeJS本身的命令。 这是我想运行的命令: cd ./src/lib && node build.js && cd ../../ && node-gyp configure && node-gyp build 第一部分运行良好: cd ./src/lib && node build.js 但是,运行第二部分cd ../../ && node-gyp configure && node-gyp build ,我得到了几个错误: Kalimini@Kalimini-PC ~/nodeWorkspace/TestProject/node_modules/node-talib-master/sr c/lib (master) $ cd ../../ && node-gyp configure && node-gyp build […]

在Debian上安装Node-Canvas时出错

当我尝试安装节点canvas模块时出现错误。 已经检查了所需的软件包并安装了它们。 我已经安装了下列软件包。 apt-get install libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g ++ 这里是错误日志: canvas@1.1.6 install /DIR/node_modules/canvas node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: "pre" versions of node cannot be installed, use the –nodedir flag instead gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16) gyp ERR! stack at Object.self.commands.(anonymous function) as install gyp ERR! stack […]

node-gyp平台特定的插件

是否有可能指定某个本地插件只是为了构build某个平台(例如: win32 )? 目前我有一个使用Windows API的C ++插件,但是node-gyp尝试为基于UNIX的系统构build它。 我一直在searchnode-gyp文档和NodeJS C / C ++插件文档部分,没有任何运气。

hello world上的node-gyb构build错误

我正在尝试编译节点hello world插件 ,当我调用node-gyp configure build它会生成几个错误。 ../binding.cc:6:19: error: unknown type name 'FunctionCallbackInfo' void Method(const FunctionCallbackInfo<Value>& args) { ^ ../binding.cc:6:39: error: expected ')' void Method(const FunctionCallbackInfo<Value>& args) { ^ ../binding.cc:6:12: note: to match this '(' void Method(const FunctionCallbackInfo<Value>& args) { ^ ../binding.cc:8:15: error: no matching constructor for initialization of 'v8::HandleScope' HandleScope scope(isolate); ^ ~~~~~~~ /***/***/.node-gyp/0.10.36/deps/v8/include/v8.h:473:3: note: candidate […]

node-gyp错误找不到模块'/node_modules/node-gyp/bin/node-gyp.js'

为什么当node-gyp本身安装在/ usr / bin / node-gyp中时,它在绝对path中查找node-gyp.js? 如果我做 find /usr -name node-gyp.js 结果是 /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js 可以看出,我在两个地方有node-gyp.js。 我该如何指导node-gyp来search这些地方?

如何从node-gyp定位'imqi.hpp'

我正尝试使用“nan”模块从node.js调用MQ_CONNECT() 看到 Node.js和C / C ++的集成:如何正确实现callback? 和https://github.com/nodejs/nan 当我使用“node-gyp”时,它说它找不到“imqi.hpp”,即MQ头 据我所见,MQ的path必须在“binding.gyp”中提供,而我试过这个没有成功: { "targets": [ { "target_name": "mqconn", "sources": [ "initall.cc", "mqconn.cc" ], "include_dirs": [ "<!(node -e \"require('nan')\")", "c:\MQ\tools\cplus\include" ] } ] } anyboby有一个线索如何解决这个问题? 塞巴斯蒂安。 PD.-当然,该文件是path指示的地方: c:\>dir c:\MQ\tools\cplus\include\imqi.hpp Volume in drive C is OS Volume Serial Number is 12AA-0601 Directory of c:\MQ\tools\cplus\include 27/06/2013 02:00 1.538 imqi.hpp

使用node-nan在一个node.js模块中设置WindowsHookEx

我正在尝试创build一个Electron node.js应用程序,它可以使用全局键绑定执行某些function。 Electron中的全局键绑定API在游戏中不起作用,所以我需要创build一个监听这些低级别键事件的本地节点模块。 所以我使用node-gyp来编译visual studio 2015和nan的项目来提供节点和c ++之间的通信。 我已经设法让这个项目的两个方面分别工作(低级别的键绑定和node.js < – > nan通信),但是我很难将它们结合起来。 我也承认我有很less的经验与c + +(我没有写一个单一的c + +程序)。 #include "node_modules/nan/nan.h" using namespace std; using namespace Nan; HHOOK _hook; KBDLLHOOKSTRUCT kbdStruct; class KeyboardEventWorker : public AsyncProgressWorker { public: KeyboardEventWorker(Callback *callback, Callback *progress) : AsyncProgressWorker(callback), progress(progress) {} ~KeyboardEventWorker() {} LRESULT CALLBACK HookCallback(int nCode,WPARAM wParam,LPARAM lParam) { executionProgress->Send(reinterpret_cast<const char*>(nCode), […]

安装Atom term2软件包时出错

OS: ~ ❯❯❯ sw_vers ProductName: Mac OS X ProductVersion: 10.10.5 primefaces: ~ ❯❯❯ atom –version 1.4.1 APM: ~ ❯❯❯ apm –version apm 1.5.0 npm 2.13.3 node 0.10.40 python 2.7.10 git 2.7.0 试图安装term2会引发以下错误: ~ ❯❯❯ apm install term2 Installing term2 to /Users/MYUSERNAME/.atom/packages ✗ > pty.js@0.2.13 install /private/var/folders/sz/17d7_n895xn6mr10m4psrj3w0004lf/T/apm-install-dir-11614-23812-smvsx/node_modules/term2/node_modules/pty.js > node-gyp rebuild Traceback (most recent call last): File […]

在Ubuntu中安装node-gd

当我安装node-gd lib时,出现以下警告: root@iZ25mlpjokyZ:~# npm install node-gd / > node-gd@1.1.0 install /root/node_modules/node-gd > node-gyp rebuild gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.3.1" gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/node_modules/node-gd/.node-gyp" gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/node_modules/node-gd/.node-gyp/4.3.1" […]

在Visual Studio 2015中构buildnode-gyp项目时发生LNK1104错误

我已经尝试了一切,我有正确版本的Python(Python27),安装了Windows SDK 8.1,也安装了Visual C ++,但构build仍然失败。 我正在使用Visual Studio 2015社区编辑器顺便说一句。 当我尝试从cmd执行node-gyp build ,出现以下错误: > C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.t argets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v14 0') cannot be found. To build using the v140 build tools, either click the Proj ect menu or right-click the solution, and then select "Update VC++ Projects…" . […]