Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when running example script #5

Open
gokseltokur opened this issue Aug 21, 2019 · 3 comments
Open

Issue when running example script #5

gokseltokur opened this issue Aug 21, 2019 · 3 comments

Comments

@gokseltokur
Copy link

gokseltokur commented Aug 21, 2019

I am facing with this issue when i run the codes that is given in readme file.

C:\Codes\wits-master>node try1.js
C:\Codes\wits-master\node_modules\wits\node_modules\bindings\bindings.js:135
throw err;
^

Error: Could not locate the bindings file. Tried:
→ C:\Codes\wits-master\node_modules\wits\build\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\build\Debug\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\build\Release\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\out\Debug\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\Debug\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\out\Release\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\Release\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\build\default\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\compiled\10.16.3\win32\x64\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\addon-build\release\install-root\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\addon-build\debug\install-root\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\addon-build\default\install-root\emotiv.node
→ C:\Codes\wits-master\node_modules\wits\lib\binding\node-v64-win32-x64\emotiv.node
at bindings (C:\Codes\wits-master\node_modules\wits\node_modules\bindings\bindings.js:126:9)
at Object. (C:\Codes\wits-master\node_modules\wits\index.js:1:35)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Codes\wits-master\try1.js:1:14)

@gokseltokur
Copy link
Author

I even tried on Ubuntu 18.04. I got this error on it,

wits@2.0.2 preinstall /home/goksel/Codes/wits-master/node_modules/wits
if [ ! -d lib/emokit-c ] ; then git clone https://github.com/dashersw/emokit-c.git lib/emokit-c; fi

Cloning into 'lib/emokit-c'...
remote: remote: Enumerating objects: 713, done.
remote: Total 713 (delta 0), reused 0 (delta 0), pack-reused 713
Receiving objects: 100% (713/713), 721.72 KiB | 8.29 MiB/s, done.
Resolving deltas: 100% (281/281), done.

wits@2.0.2 install /home/goksel/Codes/wits-master/node_modules/wits
node-gyp rebuild

make: Entering directory '/home/goksel/Codes/wits-master/node_modules/wits/build'
SOLINK_MODULE(target) Release/obj.target/../node-addon-api/src/nothing.node
COPY Release/nothing.node
CC(target) Release/obj.target/emotiv/lib/fprintf_override.o
CXX(target) Release/obj.target/emotiv/lib/bindings.o
CC(target) Release/obj.target/emotiv/lib/emokit-c/src/emokit.o
In file included from ../lib/emokit-c/src/emokit.c:20:0:
../lib/emokit-c/include/emokit/emokit.h:33:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
const static uint32_t EMOKIT_VID = 0x1234;
^~~~~
../lib/emokit-c/include/emokit/emokit.h:35:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
const static uint32_t EMOKIT_PID = 0xed02;
^~~~~
../lib/emokit-c/include/emokit/emokit.h:44:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
const static uint32_t EMOKIT_OUT_ENDPT = 0x02;
^~~~~
../lib/emokit-c/include/emokit/emokit.h:46:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
const static uint32_t EMOKIT_IN_ENDPT = 0x82;
^~~~~
../lib/emokit-c/src/emokit.c:21:10: fatal error: hidapi/hidapi.h: No such file or directory
#include "hidapi/hidapi.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
emotiv.target.mk:121: recipe for target 'Release/obj.target/emotiv/lib/emokit-c/src/emokit.o' failed
make: *** [Release/obj.target/emotiv/lib/emokit-c/src/emokit.o] Error 1
make: Leaving directory '/home/goksel/Codes/wits-master/node_modules/wits/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/goksel/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at ChildProcess.emit (events.js:209:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 5.0.0-23-generic
gyp ERR! command "/home/goksel/.nvm/versions/node/v12.9.0/bin/node" "/home/goksel/.nvm/versions/node/v12.9.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/goksel/Codes/wits-master/node_modules/wits
gyp ERR! node -v v12.9.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wits@2.0.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wits@2.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/goksel/.npm/_logs/2019-08-22T16_38_25_128Z-debug.log

@dashersw
Copy link
Owner

Hello! Wits doesn't run on Windows yet, but on Linux after installing hidapi and mcrypt, it should work. Please have a look at the Dockerfile here, it might help: https://github.com/dashersw/brain-monitor/pull/1/files#diff-3254677a7917c6c01f55212f86c57fbf

@dashersw
Copy link
Owner

dashersw commented Sep 22, 2019

apt-get update && apt-get upgrade -y && apt-get autoremove && apt-get autoclean
apt-get install -y \
	        libhidapi-dev \
	        libblas-dev \
	        liblapack-dev \
	        libmcrypt-dev 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants