Closed mobilars closed 7 years ago
My bet is on there being a problem with my script actually! Was this while running curl -sL https://raw.githubusercontent.com/patrickjquinn/P-Brain.ai-RasPi/master/raspberrypi.sh | bash
or when installing manually?
Yes, it was while running that. There was also an error a bit further down using something called node-pre-gyp so I'm trying to install that manually and rerun npm install...
That didn't seem to work either. Here's the full error console output while doing npm install (after first having run the curl etc that you did (and cd-ing into the directory).
pi@raspberrypi:~/pibrain/P-Brain.ai-RasPi $ npm install npm WARN package.json P-Brain.ai-Client@0.5.3 No repository field. npm WARN engine request@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine form-data@2.1.2: wanted: {"node":">= 0.12"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine hawk@3.1.3: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"}) |
snowboy@1.1.0 preinstall /home/pi/pibrain/P-Brain.ai-RasPi/node_modules/snowboy npm install node-pre-gyp
npm WARN engine request@2.79.0: wanted: {"node":">= 4"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine deep-extend@0.4.1: wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine form-data@2.1.2: wanted: {"node":">= 0.12"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine hawk@3.1.3: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"}) npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.29","npm":"1.4.21"}) node-pre-gyp@0.6.32 node_modules/node-pre-gyp ├── semver@5.3.0 ├── nopt@3.0.6 (abbrev@1.0.9) ├── mkdirp@0.5.1 (minimist@0.0.8) ├── rc@1.1.6 (ini@1.3.4, strip-json-comments@1.0.4, deep-extend@0.4.1, minimist@1.2.0) ├── tar@2.2.1 (inherits@2.0.3, block-stream@0.0.9, fstream@1.0.10) ├── npmlog@4.0.2 (set-blocking@2.0.0, console-control-strings@1.1.0, are-we-there-yet@1.1.2, gauge@2.7.2) ├── tar-pack@3.3.0 (uid-number@0.0.6, once@1.3.3, debug@2.2.0, readable-stream@2.1.5, fstream@1.0.10, fstream-ignore@1.0.5) ├── rimraf@2.5.4 (glob@7.1.1) └── request@2.79.0 (is-typedarray@1.0.0, aws-sign2@0.6.0, oauth-sign@0.8.2, forever-agent@0.6.1, tunnel-agent@0.4.3, caseless@0.11.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, aws4@1.5.0, uuid@3.0.1, combined-stream@1.0.5, qs@6.3.0, form-data@2.1.2, mime-types@2.1.14, tough-cookie@2.3.2, har-validator@2.0.6, hawk@3.1.3, http-signature@1.1.1)
snowboy@1.1.0 install /home/pi/pibrain/P-Brain.ai-RasPi/node_modules/snowboy node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.1.0/Release/snowboy-v1.1.0-node-v11-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for snowboy@1.1.0 and node@0.10.29 (node-v11 ABI) (falling back to source compile with node-gyp)
module.js:340
throw err;
^
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at [eval]:1:1
at Object.gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.4.38-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "configure" "--fallback-to-build" "--module=/home/pi/pibrain/P-Brain.ai-RasPi/node_modules/snowboy/lib/node/binding/Release/node-v11-linux-arm/snowboy.node" "--module_name=snowboy" "--module_path=/home/pi/pibrain/P-Brain.ai-RasPi/node_modules/snowboy/lib/node/binding/Release/node-v11-linux-arm"
gyp ERR! cwd /home/pi/pibrain/P-Brain.ai-RasPi/node_modules/snowboy
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp configure --fallback-to-build --module=/home/pi/pibrain/P-Brain.ai-RasPi/node_modules/snowboy/lib/node/binding/Release/node-v11-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/pibrain/P-Brain.ai-RasPi/node_modules/snowboy/lib/node/binding/Release/node-v11-linux-arm' (1)
node-pre-gyp ERR! stack at ChildProcess.
npm ERR! snowboy@1.1.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the snowboy@1.1.0 install script.
npm ERR! This is most likely a problem with the snowboy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls snowboy
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.38-v7+ npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! cwd /home/pi/pibrain/P-Brain.ai-RasPi npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/pi/pibrain/P-Brain.ai-RasPi/npm-debug.log npm ERR! not ok code 0
Could it be that I have the wrong version of node?
I upgraded (from legacy node) to node v7.4.0. It seems to get a bit further.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN P-Brain.ai@0.5.3 license should be a valid SPDX license expression -ne Done Installing P-Brain client modules... npm WARN lifecycle snowboy@1.1.0~preinstall: cannot run in wd %s %s (wd=%s) snowboy@1.1.0 npm install node-pre-gyp /opt/P-Brain.ai-client/node_modules/.staging/snowboy-6732e5e7
snowboy@1.1.0 install /opt/P-Brain.ai-client/node_modules/snowboy node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.1.0/Release/snowboy-v1.1.0-node-v51-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for snowboy@1.1.0 and node@7.4.0 (node-v51 ABI) (falling back to source compile with node-gyp) module.js:472 throw err; ^
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at [eval]:1:1
at ContextifyScript.Script.runInThisContext (vm.js:26:33)
at Object.exports.runInThisContext (vm.js:79:17)
at Object.gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.38-v7+
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/P-Brain.ai-client/node_modules/snowboy/lib/node/binding/Release/node-v51-linux-arm/snowboy.node" "--module_name=snowboy" "--module_path=/opt/P-Brain.ai-client/node_modules/snowboy/lib/node/binding/Release/node-v51-linux-arm"
gyp ERR! cwd /opt/P-Brain.ai-client/node_modules/snowboy
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/P-Brain.ai-client/node_modules/snowboy/lib/node/binding/Release/node-v51-linux-arm/snowboy.node --module_name=snowboy --module_path=/opt/P-Brain.ai-client/node_modules/snowboy/lib/node/binding/Release/node-v51-linux-arm' (1)
node-pre-gyp ERR! stack at ChildProcess.
npm WARN P-Brain.ai-Client@0.5.3 No repository field. npm WARN P-Brain.ai-Client@0.5.3 license should be a valid SPDX license expression npm ERR! Linux 4.4.38-v7+ npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE
npm ERR! snowboy@1.1.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the snowboy@1.1.0 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the snowboy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs snowboy
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls snowboy
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /opt/P-Brain.ai-client/npm-debug.log -ne Done
P-Brain.ai-Client@0.5.3 start /opt/P-Brain.ai-client node client.js
module.js:472 throw err; ^
Error: Cannot find module 'snowboy'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.
npm ERR! Linux 4.4.38-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! P-Brain.ai-Client@0.5.3 start: node client.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the P-Brain.ai-Client@0.5.3 start script 'node client.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the P-Brain.ai-Client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node client.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs P-Brain.ai-Client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls P-Brain.ai-Client
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /opt/P-Brain.ai-client/npm-debug.log pi@raspberrypi:~/pibrain $
And then:
pi@raspberrypi:~/node $ cat /opt/P-Brain.ai-client/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using npm@4.0.5
3 info using node@v7.4.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle P-Brain.ai-Client@0.5.3~prestart: P-Brain.ai-Client@0.5.3
6 silly lifecycle P-Brain.ai-Client@0.5.3~prestart: no script for prestart, continuing
7 info lifecycle P-Brain.ai-Client@0.5.3~start: P-Brain.ai-Client@0.5.3
8 verbose lifecycle P-Brain.ai-Client@0.5.3~start: unsafe-perm in lifecycle true
9 verbose lifecycle P-Brain.ai-Client@0.5.3~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/opt/P-Brain.ai-client/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle P-Brain.ai-Client@0.5.3~start: CWD: /opt/P-Brain.ai-client
11 silly lifecycle P-Brain.ai-Client@0.5.3~start: Args: [ '-c', 'node client.js' ]
12 silly lifecycle P-Brain.ai-Client@0.5.3~start: Returned: code: 1 signal: null
13 info lifecycle P-Brain.ai-Client@0.5.3~start: Failed to exec start script
14 verbose stack Error: P-Brain.ai-Client@0.5.3 start: node client.js
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.node client.js
22 error Exit status 1
23 error Failed at the P-Brain.ai-Client@0.5.3 start script 'node client.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the P-Brain.ai-Client package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node client.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs P-Brain.ai-Client
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls P-Brain.ai-Client
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Ah ha! I removed the node install portion of the script so you're using an old version of node!
Try running
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
And then running the installer again :) good catch!
Needs to be node 6 :) also remove node_modules before you npm install
I've added the correct nodejs version to the provision script, feel free to installed via the automatic installer :)
Re-ran it. After running your script, I had to install the following modules manually: node-record-lpcm16, request, snowball, thunkify-wrap, co, q. After that it seems to run (havent got the audio to work yet, but that's probably just my setup).
That shouldn't happen, the modules should be installed during script execution, I need to test this properly on my Raspberry Pi (which I haven't really due to not having a USB microphone...my bad)
Configuration of a usb mike together with an audio output on Raspberry pi, which ends up on different sound cards, is also a bit tricky...
That shouldn't happen, the modules should be installed during script execution, I need to test this properly on my Raspberry Pi (which I haven't really due to not having a USB microphone...my bad)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/patrickjquinn/P-Brain.ai-RasPi/issues/3#issuecomment-275931600, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQrKJoKYMn5V8ranFxN4Kz8N34VLlRzks5rXNB7gaJpZM4Lwpk8 .
Once I get my hands on a USB 🎤 I'll add in auto configuration which uses the first available device as the default :)
I guess this isn't really a fault in your script, but when I run that Raspberry Pi install script, the execution halts while installing snowboy. It seems like there's no file at that URL it's trying to install. Any idea what could be wrong? I'm running a Raspberry Pi 3 with the latest Rasbpian. (I'm guessing this is a problem with the snowboy package?)
... way down while installing...
node-pre-gyp ERR! Tried to download(403): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.1.0/Release/snowboy-v1.1.0-node-v11-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for snowboy@1.1.0 and node@0.10.29 (node-v11 ABI) (falling back to source compile with node-gyp)
module.js:340 throw err;