matijse / eufy-ha-mqtt-bridge

Receive Eufy alerts and thumbnails in Home Assistant via MQTT
124 stars 25 forks source link

Startup error - HA Core #88

Closed BalanceBreaker closed 3 years ago

BalanceBreaker commented 3 years ago

Hey, first of all thanks for this project!

I get this strange error which i cant solve on my own sadly. I also tried to see if anybody else had similar issues but couldnt find any (on this github).

Here is the log if that help you!

0 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'run', 'start' ]
1 info using npm@7.5.2
2 info using node@v10.24.0
3 timing config:load:defaults Completed in 11ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 12ms
5 timing config:load:builtin Completed in 13ms
6 timing config:load:cli Completed in 15ms
7 timing config:load:env Completed in 3ms
8 timing config:load:file:/home/plswork/eufy-ha-mqtt-bridge/.npmrc Completed in 1ms
9 timing config:load:project Completed in 5ms
10 timing config:load:file:/root/.npmrc Completed in 1ms
11 timing config:load:user Completed in 2ms
12 timing config:load:file:/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 2ms
15 timing config:load:validate Completed in 3ms
16 timing config:load:setUserAgent Completed in 2ms
17 timing config:load:setEnvs Completed in 6ms
18 timing config:load Completed in 66ms
19 verbose npm-session 9e459564638b44f4
20 timing npm:load Completed in 131ms
21 timing command:run-script Completed in 3961ms
22 verbose stack Error: command failed
22 verbose stack     at ChildProcess.proc.on (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
22 verbose stack     at ChildProcess.emit (events.js:198:13)
22 verbose stack     at maybeClose (internal/child_process.js:982:16)
22 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
23 verbose pkgid eufy-ha-mqtt-bridge@1.0.0
24 verbose cwd /home/plswork/eufy-ha-mqtt-bridge
25 verbose Linux 5.10.17-v7+
26 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "start"
27 verbose node v10.24.0
28 verbose npm  v7.5.2
29 error code 1
30 error path /home/plswork/eufy-ha-mqtt-bridge
31 error command failed
32 error command sh -c NODE_ENV=production node --unhandled-rejections=strict index.js
33 verbose exit 1

Sorry in advance if this is a simple problem and im just unable to see / solve it myself!

Have a nice day!

BalanceBreaker commented 3 years ago

OK i tried to troubleshoot it but now NPM wont even throw any errors but from the exceptions.log file ive recovered this:

"level":"error", "message":"uncaughtException: Unexpected identifier\n/home/pi/Desktop/eufy-ha-mqtt-bridge/config/index.js:8\n eufyPassword\n ^^^^^^^^^^^^\n\nSyntaxError: Unexpected identifier\n at Module._compile (internal/modules/cjs/loader.js:723:23)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\n at Module.load (internal/modules/cjs/loader.js:653:32)\n at tryModuleLoad (internal/modules/cjs/loader.js:593:12)\n at Function.Module._load (internal/modules/cjs/loader.js:585:3)\n at Module.require (internal/modules/cjs/loader.js:692:17)\n at require (internal/modules/cjs/helpers.js:25:18)\n at Object.<anonymous> (/home/pi/Desktop/eufy-ha-mqtt-bridge/eufy/client.js:2:16)\n at Module._compile (internal/modules/cjs/loader.js:778:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)", "stack":"/home/pi/Desktop/eufy-ha-mqtt-bridge/config/index.js:8\n eufyPassword\n ^^^^^^^^^^^^\n\nSyntaxError: Unexpected identifier\n at Module._compile (internal/modules/cjs/loader.js:723:23)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)\n at Module.load (internal/modules/cjs/loader.js:653:32)\n at tryModuleLoad (internal/modules/cjs/loader.js:593:12)\n at Function.Module._load (internal/modules/cjs/loader.js:585:3)\n at Module.require (internal/modules/cjs/loader.js:692:17)\n at require (internal/modules/cjs/helpers.js:25:18)\n at Object.<anonymous> (/home/pi/Desktop/eufy-ha-mqtt-bridge/eufy/client.js:2:16)\n at Module._compile (internal/modules/cjs/loader.js:778:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)", "exception":true,

and that doesnt look good to me, but im pretty sure its due to user error (me) but im still completely lost as to what to do to fix it. Looks like me trying to fix the first problem made everything worse.

BalanceBreaker commented 3 years ago

Fixed all errors by just moving all to a separate docker image!

Thanks again.