mattaylor / emoosc

OSC (Open sound control) proxy to Emotiv's cortex service
0 stars 1 forks source link

Emotiv Insight #5

Open blairzaye opened 4 years ago

blairzaye commented 4 years ago

Ok..

So I must be doing something wrong... I am on a macbook 2020 in win 10 with boot camp with a Emotiv Insight with dongle, trying to get OSC into touchdesigner. most interested in the emotion performance metrics, but would also like the raw data and the brainwaves (alpha, beta, etc)

Ive updated my config.js with with account and licence details and tried to run

$ npm install emoosc $ cd emoosc $ npm run -- config.js or npm install emoosc $ cd emoosc $ npm run -- config.js

From Node.js command prompt

and got this..

emoosc node

what do i need to do? noob :)

blairzaye commented 4 years ago

ok was defo doing something wrong.. needed to run it on Git Bash.. So.. ive done that.. I think.. :) Ive installed emoosc, then try to run the config.. but get

git bash Capture

with the log saying

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli '--', 1 verbose cli 'config.js' 1 verbose cli ] 2 info using npm@6.14.4 3 info using node@v12.18.0 4 verbose stack Error: missing script: config.js 4 verbose stack at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:155:19) 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:63:5 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:116:5 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\nodemodules\read-package-json\read-json.js:436:5 4 verbose stack at checkBinReferences (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:391:45) 4 verbose stack at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:434:3) 4 verbose stack at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:161:5) 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:281:12 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:115:16 4 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) 5 verbose cwd C:\Users\Blair\Downloads\emoosc-master\emoosc-master 6 verbose Windows_NT 10.0.19041 7 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "--" "config.js" 8 verbose node v12.18.0 9 verbose npm v6.14.4 10 error missing script: config.js 11 verbose exit [ 1, true ]

am I doing this right?

blairzaye commented 4 years ago

Moved and renamed the emoosc folder to try to get it to pick it up.. and copied the contents of nodejs folder from https://github.com/Emotiv/cortex-v2-example tried a couple of things... still no luck..

another attempt

log is

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli '--', 1 verbose cli 'config.js' 1 verbose cli ] 2 info using npm@6.14.4 3 info using node@v12.18.0 4 verbose stack Error: missing script: config.js 4 verbose stack at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:155:19) 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:63:5 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:116:5 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\nodemodules\read-package-json\read-json.js:436:5 4 verbose stack at checkBinReferences (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:391:45) 4 verbose stack at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:434:3) 4 verbose stack at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:161:5) 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:281:12 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:115:16 4 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) 5 verbose cwd C:\emoosc 6 verbose Windows_NT 10.0.19041 7 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "--" "config.js" 8 verbose node v12.18.0 9 verbose npm v6.14.4 10 error missing script: config.js 11 verbose exit [ 1, true ]

mattaylor commented 4 years ago

you can't run js scripts as commands. You need to execute them using the 'node' binary. I suggest you first spend a little time getting comfortable with basic node programming - many great resources online. I also strongly suggest not using windows when working with node. I would recomend using using the bash linux subsystem for windows or running ubuntu as a linux vm using vitualbox or similar.

blairzaye commented 4 years ago

Hey Mat, thanks for your reply

was following through your readme

Install Install latest version of Emotiv cortex SDK (available from Emotiv.com) Config.js should be updated with acconut and licence details avialable at my.emotiv.com.

$ npm install emoosc $ cd emoosc $ npm run -- config.js

so from command prompt ive done

npm install emoosc (this worked)

cd emoosc (not sure about this as I am already in the folder in my case 'c:\emoosc-test') although there is another emoosc folder in c:\emoosc-test\node_modules, running the next command from both

npm run -- config.js I still get C:\Users\Blair>cd\emoosc-test

C:\emoosc-test>npm run -- config.js npm ERR! missing script: config.js

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Blair\AppData\Roaming\npm-cache_logs\2020-06-13T20_49_11_514Z-debug.log

C:\emoosc-test>

with log saying

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli '--', 1 verbose cli 'config.js' 1 verbose cli ] 2 info using npm@6.14.4 3 info using node@v12.18.0 4 verbose stack Error: missing script: config.js 4 verbose stack at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:155:19) 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:63:5 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:116:5 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\nodemodules\read-package-json\read-json.js:436:5 4 verbose stack at checkBinReferences (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:391:45) 4 verbose stack at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:434:3) 4 verbose stack at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:161:5) 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:281:12 4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:115:16 4 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3) 5 verbose cwd C:\emoosc-test 6 verbose Windows_NT 10.0.19041 7 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "--" "config.js" 8 verbose node v12.18.0 9 verbose npm v6.14.4 10 error missing script: config.js 11 verbose exit [ 1, true ]

So some reason it thinks that config.js is missing I have then tried adding "start": "node config.js", to the package.js as it may have needed it? still getting the same thing..

I am already running win10 on a Mac in bootcamp dont think i want to then run linux within that.. but thanks for the suggestion

any ideas what I could try?