Open djipco opened 6 years ago
As I commented here https://github.com/nwjs/nw-gyp/issues/107#issuecomment-350944606 it works for me.
From your log I can see that 'node-pre-gyp' calls 'nw-gyp' without proper arguments so 'nw-gyp' failed. I'm not sure whether it's an issue in 'node-pre-gyp' but it doesn't run here when I tried to reproduce your issue.
Maybe it's something in your package.json. You could try my simple package.json in your system first to isolate other causes.
You could try my simple package.json in your system first to isolate other causes.
I just did. Same result. Problem remains.
Maybe you installed node-pre-gyp
globally. I don't have that in my system.
At first, I did not. Then, I installed it to see if it would fix the problem. I just removed it.
The root cause of your issue is that nw-gyp
is not properly called by node-pre-gyp
, which is not supposed to be running at all if a simple serialport
is being installed.
I understand that node-pre-gyp
is not relaying the version information, but I'm not sure why it shouldn't be running... In all honesty, I'm a bit out of my league here.
I filed an issue with node-pre-gyp in case you want to supply more information to them.
I'm not sure what more I can do... this is so disheartening.
Why it should? It doesn't even exist in my system.
On Dec 13, 2017 12:19 AM, "Jean-Philippe Côté" notifications@github.com wrote:
I understand that node-pre-gyp is not relaying the version information, but I'm not sure why it shouldn't be running... In all honesty, I'm a bit out of my league here.
I filed an issue with node-pre-gyp https://github.com/mapbox/node-pre-gyp/issues/338 in case you want to supply more information to them.
I'm not sure what more I can do... this is so disheartening.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nwjs/nw-gyp/issues/115#issuecomment-351101989, or mute the thread https://github.com/notifications/unsubscribe-auth/ASrVCXYFgKwK3EEKhT88a5EY6Fy09wTmks5s_qd5gaJpZM4Q_KFl .
You could try to find out how node-pre-gyp was installed in your system.
I did not install node-pre-gyp
. I don't even really know what it is or what it does. I'm just trying to use native modules...
When I manually rebuild both modules (serialport & opencv4nodejs) with nw-gyp rebuild --target=0.27.1 --arch=x64
. It works.
However, when I start my app, it cannot find one of the modules. The file is there (I triple-checked) but it says it can't find it:
Uncaught Error: The specified module could not be found.
\\?\C:\Users\jpcote\Desktop\50e\package.nw\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node
at Object.Module._extensions..node (module.js:713:18)
at Module.load (module.js:585:32)
at tryModuleLoad (module.js:528:12)
at Function.Module._load (module.js:520:3)
at Module.require (module.js:610:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\jpcote\Desktop\50e\package.nw\node_modules\opencv4nodejs\lib\opencv4nodejs.js:7:8)
at Module._compile (module.js:666:30)
at Object.Module._extensions..js (module.js:683:10)
at Module.load (module.js:585:32)
It often means some dependency DLLs are not in the correct PATH
On Dec 13, 2017 6:25 AM, "Jean-Philippe Côté" notifications@github.com wrote:
When I manually rebuild both modules (serialport & opencv4nodejs) with nw-gyp rebuild --target=0.27.1 --arch=x64. It works.
However, when I start my app, it cannot find one of the modules. The file is there (I triple-checked) but it says it can't find it:
Uncaught Error: The specified module could not be found. \?\C:\Users\jpcote\Desktop\50e\package.nw\node_modules\opencv4nodejs\build\Release\opencv4nodejs.node at Object.Module._extensions..node (module.js:713:18) at Module.load (module.js:585:32) at tryModuleLoad (module.js:528:12) at Function.Module._load (module.js:520:3) at Module.require (module.js:610:17) at require (internal/module.js:11:18) at Object.
(C:\Users\jpcote\Desktop\50e\package.nw\node_modules\opencv4nodejs\lib\opencv4nodejs.js:7:8) at Module._compile (module.js:666:30) at Object.Module._extensions..js (module.js:683:10) at Module.load (module.js:585:32) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nwjs/nw-gyp/issues/115#issuecomment-351215639, or mute the thread https://github.com/notifications/unsubscribe-auth/AEB5QviXfLWr-Kwsp9D01y3FGLyMQbi_ks5s_v1pgaJpZM4Q_KFl .
@GnorTech Thanks. Any idea what I can do about this? I guess I'll file an issue on the module's GitHub.
It may not be an issue in it. First you can try to make it work with Node.js on Windows.
PS: on your last comment, you may not install node-pre-gyp
by yourself, but it may be get installed by dependencies. That's why Roger suggested starting with a simple bare package.json to isolate causes. At least it was never installed in our test environment trying to reproduce your issue.
Even with a bare package the problem is still there. It's probably something with the opencv4nodejs
module or my own configuration of OpenCV. Thanks for your help.
The original problem still remains though. I'm not sure how to address it. Anyway, thanks.
wondering if this was solved? I got the same problem when compiling nodegit under nwjs 0.40.2
I'm trying to move a project from macOS to Windows. The project uses two native modules: serialport and opencv4nodejs. Everything works fine on macOS.
When I run
npm install
on Windows 10 (after having deleted thenode_modules
folder and carefully followed the instructions), I get an "Invalid version number" error.I'm using nw-gyp@3.6.3. Here is what I enter on the command line:
Here is the output I get: