MMM-awesome-alexa
MMM-awesome-alexa copied to clipboard
Error Installing
Hi,
I tried to install and received the following errors:
If you know how to work around them, I'd really appreciate your help.
Thanks!
pi@raspberrypi:~/MagicMirror/modules/MMM-awesome-alexa $ npm install --only=prod
[email protected] install /home/pi/MagicMirror/modules/MMM-awesome-alexa/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.3.1/Release/snowboy-v1.3.1-node-v64-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) node-pre-gyp ERR! Tried to download(undefined): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.3.1/Release/snowboy-v1.3.1-node-v64-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) internal/modules/cjs/loader.js:638 throw err; ^
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at [eval]:1:1
at Script.runInThisContext (vm.js:122:20)
at Object.runInThisContext (vm.js:329:38)
at Object.
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at [eval]:1:1
at Script.runInThisContext (vm.js:122:20)
at Object.runInThisContext (vm.js:329:38)
at Object.gyp
failed with exit code: 1
Error: gyp
failed with exit code: 1
gypgyp ERR!ERR! stackstack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gypgyp ERR!ERR! stackstack at ChildProcess.emit (events.js:198:13)
at ChildProcess.emit (events.js:198:13)
gypgyp ERR!ERR! stackstack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gypgyp ERR!ERR! SystemSystem Linux 4.19.75-v7+
Linux 4.19.75-v7+
gypgyp ERR!ERR! commandcommand "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/node-v64-linux-arm/snowboy.node" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/node-v64-linux-arm"
"/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/node-v64-linux-arm/snowboy.node" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/node-v64-linux-arm"
gypgyp ERR!ERR! cwdcwd /home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy
/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy
gypgyp ERR!ERR! node -vnode -v v10.18.1
v10.18.1
gypgyp ERR!ERR! node-gyp -vnode-gyp -v v5.0.5
v5.0.5
gypgyp ERR!ERR! not ok
not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/node-v64-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/node-v64-linux-arm' (1)
node-pre-gyp ERR! stack at ChildProcess.node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/pi/.npm/_logs/2020-01-12T16_58_57_599Z-debug.log
I am getting the same error.
I had the same error, im now trying something different (although the functionallity will be different). Im be running a script with alexapi and magicmirror on the same pi. That module appears to be very fragile and an alexpi install was pretty straightforward and it worked straight away. Maybe that helps..
Have you solved the issue?
I know I got past it. Looking back, I think I followed evancohen's advice on: https://github.com/Kitt-AI/snowboy/issues/603 and did: npm install snowboy@sonus.
no, that didn't works for me. I've installed it manually like somebody described it for another plugin which needs snowboy. It works so far, that I successfully did run "npm run config-helper" including getting refreshToken and so on. But after I start magicmirror I get only a blank black screen. In dev mode it tells me: "WARNING! Could not load config file. Starting with default configuration. Error found: Error: Cannot find module '/home/pi/MagicMirror/node_modules/snowboy/lib/node/binding/Release/electron-v3.1-linux-arm/snowboy.node'"
I understand it in that way, that the binary of electron is not build successfully :-(
I'm going crazy with this peace of software
No, it din't works. I've done now the 5th time or so try from beginning and I get everytime the same result by tryin different ways...
I used this instructions:
$ cd ~/MagicMirror/modules # Navigate to module folder $ git clone https://github.com/dolanmiu/MMM-awesome-alexa.git # Clone this repository $ cd MMM-awesome-alexa # go into the module directory $ npm install --only=prod # Install depdendencies $ cd node_modules $ rm -rf snowboy # Remove the installed snowboy $ git clone https://github.com/Kitt-AI/snowboy.git # Manually get snowboy from git $ cd snowboy # Go into the /snowboy directory $ rm -rf node_modules $ npm install nan --save # Make sure you install this in the /snowboy directory $ npm install [email protected] --save # Make sure you install this in the /snowboy directory $ npm install # Make sure you install in the /snowboy directory $ npm run prepublish # Make sure you run this in the /snowboy directory $ npm install --save-dev electron-rebuild # Make sure you install this in the /snowboy directory $ npm install nan # Make sure you install this in the /snowboy directory $ ./node_modules/.bin/electron-rebuild # Build snowboy to your device specifications, in the /snowboy directory
At the point "$ npm install # Make sure you install in the /snowboy directory" everytime it fails....
Another day and another try from scratch on a new sdcard
I looked at what step I got my first problems. I used the official MM2 instructions to install (manually) and made the "buster" modifications. After that I used the "npm install snowboy@sonus" Binaries instead of "git clone https://github.com/Kitt-AI/snowboy.git # Manually get snowboy from git". After that step I got "found 528 vulnerabilities (6 low, 8 moderate, 514 high)" so I've done a "npm audit fix" like suggested. Next steps "cd snowboy # Go into the /snowboy directory" and "rm -rf node_modules" are without any issues (dir node_modules" doesn't exists with these binaries). Step "npm install nan --save" gives a good output "added 1 package from 8 contributors and audited 1 package in 2.389s found 0 vulnerabilities" aslo the next step: "npm install [email protected] --save
- [email protected]
added 67 packages from 25 contributors and audited 98 packages in 18.187s
1 package is looking for funding
run
npm fund
for details found 0 vulnerabilities"
But now the problems begins: "pi@magicmirror-bath:~/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy $ npm install
[email protected] install /home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
[snowboy] Success: "/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/binding/Release/node-v64-linux-arm/snowboy.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm WARN prepublish-on-install As of npm@5, prepublish
scripts are deprecated.
npm WARN prepublish-on-install Use prepare
for build steps and prepublishOnly
for upload-only.
npm WARN prepublish-on-install See the deprecation note in npm help scripts
for more information.
[email protected] prepublish /home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy tsc --listFiles
error TS6053: File '/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/SnowboyDetectNative.d.ts' not found.
error TS6053: File '/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/index.ts' not found.
error TS6053: File '/home/pi/MagicMirror/modules/MMM-awesome-alexa/node_modules/snowboy/lib/node/node-pre-gyp.d.ts' not found.
.
.
.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] prepublish: tsc --listFiles
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] prepublish 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/pi/.npm/_logs/2020-02-10T15_54_21_730Z-debug.log"
After that nothing works like it should. It seems that the snowboy build alpha 1 is too old or not that which we need to build the snowboy modules.... What can I try as next?
Wow I solved my problems :-)
First I used the original code for snowboy and get the code to work :-)
First I eleminated (or converted) the output like: "../../../../node_modules/@types/unist/index.d.ts:31:20 - error TS2304: Cannot find name 'unknown'." with installing "npm install --save rxjs" so I run into the next error output.
Now I got "two errors from these types: " node_modules/@types/node/index.d.ts:43:11 - error TS2300: Duplicate identifier 'IteratorResult'.
43 interface IteratorResult<T> { }"
So I removed the line "node_modules/@types/node/index.d.ts" in snowboy/tsconfig.json liked described in an neighbour thread. And now it compiles all modules like a charm.
_ I'm clearly not an expert but editing the tsconfig.json file worked for me:
Change
"files": [ "lib/node/index.ts", "lib/node/node-pre-gyp.d.ts", "lib/node/SnowboyDetectNative.d.ts" "node_modules/@types/node/index.d.ts" ],
into
"files": [ "lib/node/index.ts", "lib/node/node-pre-gyp.d.ts", "lib/node/SnowboyDetectNative.d.ts" ], _ Source User PierreB49: https://github.com/Kitt-AI/snowboy/issues/603
Would it be possible to list more of your steps? HabibA007? I keep getting the error at the $ npm install --only=prod
It would be good to have a troubleshooting guide for this that addresses these problems. I have had the same errors everyone else is having and not being able to move forward is very disappointing. Might have to try my hand at the Google Assistant instead.