pi@raspberrypi:~/pimatic-app/node_modules $ sudo rm -rf sqlite3
pi@raspberrypi:~/pimatic-app/node_modules $ sudo npm install sqlite3 --unsafe-perm
/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js:2
var Even�Emitter
^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:3:19)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
pi@raspberrypi:~/pimatic-app/node_modules $
-
Pimatic startup error
-
run the npm install from pimatic-app folder
-
The same message always appears
/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js:2 var Even�Emitter ^ SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:3:19) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) pi@raspberrypi:~/pimatic-app $
-
There seems to be something wrong with your tracker-base.js file. Please check it. It should look like this:
'use strict' var EventEmitter = require('events').EventEmitter var util = require('util') var trackerId = 0 var TrackerBase = module.exports = function (name) { EventEmitter.call(this) this.id = ++trackerId this.name = name } util.inherits(TrackerBase, EventEmitter)
-
Where i can find this file?
-
I’ve now done this to start over, but here’s the same message:
pi@raspberrypi:~ $ sudo rm -rf nod_modules pi@raspberrypi:~ $ sudo rm -rf pimatic-app pi@raspberrypi:~ $ sudo apt-get install build-essential git Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig build-essential ist schon die neueste Version (12.3). git ist schon die neueste Version (1:2.11.0-3+deb9u2). 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. pi@raspberrypi:~ $ cd /home/pi pi@raspberrypi:~ $ mkdir pimatic-app pi@raspberrypi:~ $ npm install pimatic --prefix pimatic-app --production /usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-base.js:2 var Even�Emitter ^ SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:373:25) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:3:19) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)
-
@schulz said in Pimatic nicht erreichbar:
pi@raspberrypi:~ $ sudo rm -rf nod_modules
pi@raspberrypi:~ $ sudo rm -rf pimatic-appYou need to properly remove your dir’s. Nod_modules is not a folder of pimatic. I suggest you start over with a complete reinstall of your OS and pimatic.
-
Ok, now I have reinstalled the operating system
now Pimatic does not start anymore!
Here’s what comes out:pi@raspberrypi:~ $ sudo service pimatic start Job for pimatic.service failed because the control process exited with error code. See "systemctl status pimatic.service" and "journalctl -xe" for details.
pi@raspberrypi:~ $ sudo service pimatic status ● pimatic.service - LSB: pimatic service Loaded: loaded (/etc/init.d/pimatic; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2018-03-21 17:11:45 CET; 45s ago Docs: man:systemd-sysv-generator(8) Process: 1353 ExecStart=/etc/init.d/pimatic start (code=exited, status=127) Mär 21 17:11:45 raspberrypi systemd[1]: Starting LSB: pimatic service... Mär 21 17:11:45 raspberrypi pimatic[1353]: /etc/init.d/pimatic: 25: /etc/init.d/ Mär 21 17:11:45 raspberrypi systemd[1]: pimatic.service: Control process exited, Mär 21 17:11:45 raspberrypi systemd[1]: Failed to start LSB: pimatic service. Mär 21 17:11:45 raspberrypi systemd[1]: pimatic.service: Unit entered failed sta Mär 21 17:11:45 raspberrypi systemd[1]: pimatic.service: Failed with result 'exi lines 1-12/12 (END)
I’m doing something wrong,
I just don’t know what? -
These are my folders in pimatic app,
Is everything okay there? -
I tried globalizing again:
pi@raspberrypi:~/pimatic-app/node_modules/pimatic $ sudo npm link npm WARN deprecated formatio@1.1.1: This package is unmaintained. Use @sinonjs/formatio instead npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info. npm WARN deprecated coffee-script@1.11.1: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) grunt-bump@0.8.0 node_modules/grunt-bump coffee-errors@0.8.6 node_modules/coffee-errors sinon@1.17.7 node_modules/sinon ├── formatio@1.1.1 ├── samsam@1.1.2 ├── lolex@1.3.2 └── util@0.10.3 (inherits@2.0.1) blanket@1.2.3 node_modules/blanket ├── isarray@0.0.1 ├── foreach@2.0.5 ├── xtend@4.0.1 ├── object-keys@1.0.11 ├── falafel@1.2.0 └── acorn@1.2.2 grunt-mocha-test@0.13.3 node_modules/grunt-mocha-test ├── hooker@0.2.3 └── mkdirp@0.5.1 (minimist@0.0.8) mocha@3.5.3 node_modules/mocha ├── browser-stdout@1.3.0 ├── escape-string-regexp@1.0.5 ├── growl@1.9.2 ├── json3@3.3.2 ├── he@1.1.1 ├── supports-color@3.1.2 (has-flag@1.0.0) ├── commander@2.9.0 (graceful-readlink@1.0.1) ├── diff@3.2.0 ├── debug@2.6.8 (ms@2.0.0) ├── mkdirp@0.5.1 (minimist@0.0.8) ├── glob@7.1.1 (path-is-absolute@1.0.1, inherits@2.0.3, fs.realpath@1.0.0, inflight@1.0.6, once@1.4.0, minimatch@3.0.4) └── lodash.create@3.1.1 (lodash._isiterateecall@3.0.9, lodash._basecreate@3.0.3, lodash._baseassign@3.2.0) grunt-cli@1.2.0 node_modules/grunt-cli ├── grunt-known-options@1.1.0 ├── nopt@3.0.6 (abbrev@1.1.1) ├── findup-sync@0.3.0 (glob@5.0.15) └── resolve@1.1.7 grunt-coffeelint@0.0.16 node_modules/grunt-coffeelint ├── coffeelint-stylish@0.1.2 (text-table@0.2.0, chalk@1.1.3) └── coffeelint@1.16.2 (ignore@3.3.7, strip-json-comments@1.0.4, coffee-script@1.11.1, resolve@0.6.3, glob@7.1.2, optimist@0.6.1) supertest@2.0.1 node_modules/supertest ├── methods@1.1.2 └── superagent@2.3.0 (cookiejar@2.1.1, component-emitter@1.2.1, extend@3.0.1, mime@1.6.0, formidable@1.2.1, qs@6.5.1, debug@2.6.9, readable-stream@2.3.5, form-data@1.0.0-rc4) jsonlint@1.6.2 node_modules/jsonlint ├── nomnom@1.8.1 (underscore@1.6.0, chalk@0.4.0) └── JSV@4.0.2 grunt@1.0.2 node_modules/grunt ├── grunt-known-options@1.1.0 ├── path-is-absolute@1.0.1 ├── eventemitter2@0.4.14 ├── rimraf@2.2.8 ├── exit@0.1.2 ├── nopt@3.0.6 (abbrev@1.1.1) ├── iconv-lite@0.4.19 ├── coffeescript@1.10.0 ├── minimatch@3.0.4 (brace-expansion@1.1.11) ├── glob@7.0.6 (inherits@2.0.3, fs.realpath@1.0.0, inflight@1.0.6, once@1.4.0) ├── findup-sync@0.3.0 (glob@5.0.15) ├── js-yaml@3.5.5 (esprima@2.7.3, argparse@1.0.10) ├── dateformat@1.0.12 (get-stdin@4.0.1, meow@3.7.0) ├── grunt-legacy-util@1.0.0 (getobject@0.1.0, async@1.5.2, hooker@0.2.3, which@1.2.14, underscore.string@3.2.3, lodash@4.3.0) └── grunt-legacy-log@1.0.1 (hooker@0.2.3, underscore.string@3.3.4, grunt-legacy-log-utils@1.0.0, lodash@4.17.5) /usr/local/bin/pimatic.js -> /usr/local/lib/node_modules/pimatic/pimatic.js /usr/local/lib/node_modules/pimatic -> /home/pi/pimatic-app/node_modules/pimatic
status now seems ok
pi@raspberrypi:~ $ sudo service pimatic status ● pimatic.service - LSB: pimatic service Loaded: loaded (/etc/init.d/pimatic; generated; vendor preset: enabled) Active: active (exited) since Wed 2018-03-21 17:39:26 CET; 45s ago Docs: man:systemd-sysv-generator(8) Process: 1695 ExecStart=/etc/init.d/pimatic start (code=exited, status=0/SUCCE Mär 21 17:39:25 raspberrypi systemd[1]: Starting LSB: pimatic service... Mär 21 17:39:26 raspberrypi pimatic[1695]: Started. Mär 21 17:39:26 raspberrypi systemd[1]: Started LSB: pimatic service.
but the daemon.log
17:45:42.049 [pimatic] info: Starting pimatic version 0.9.42 17:45:42.512 [pimatic] error: Startup error: Error: Authentication is enabled, but no password has been defined for the user "admin". Please define a password for "admin" in the users section of the config.json file or disable authentication. 17:45:42.512 [pimatic] error:> at Framework._setupExpressApp (/home/pi/pimatic-app/node_modules/pimatic/lib/framework.coffee:307:19) 17:45:42.512 [pimatic] error:> at new Framework (/home/pi/pimatic-app/node_modules/pimatic/lib/framework.coffee:87:8) 17:45:42.512 [pimatic] error:> at /home/pi/pimatic-app/node_modules/pimatic/startup.coffee:94:17 17:45:42.512 [pimatic] error:> at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23) 17:45:42.512 [pimatic] error:> at Function.Promise.attempt.Promise.try (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/method.js:39:29) 17:45:42.512 [pimatic] error:> at Object.startup (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:93:10) 17:45:42.512 [pimatic] error:> at run (/home/pi/pimatic-app/node_modules/pimatic/pimatic.js:15:24) 17:45:42.512 [pimatic] error:> at /home/pi/pimatic-app/node_modules/pimatic/lib/daemon.coffee:87:9 17:45:42.512 [pimatic] error:> at FSReqWrap.oncomplete (fs.js:82:15) 17:45:42.515 [pimatic] info: exiting...
-
@schulz said in Pimatic startup error:
17:45:42.512 [pimatic] error: Startup error: Error: Authentication is enabled, but no password has been defined for the user “admin”. Please define a password for “admin” in the users section of the config.json file or disable authentication.
Hopefully, the error message is self explanatory
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
Sorry, how stupid of me
I have entered the password and everything seems to be working, but the website is still not reachable! -
I have looked into the npm-debug.log, could that help?
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘link’ ]
2 info using npm@2.15.11
3 info using node@v4.6.2
4 verbose linkPkg /home/pi
5 verbose stack Error: ENOENT: no such file or directory, open '/home/pi/package.json’
5 verbose stack at Error (native)
6 verbose cwd /home/pi
7 error Linux 4.9.59-v7+
8 error argv “/usr/local/bin/node” “/usr/local/bin/npm” "link"
9 error node v4.6.2
10 error npm v2.15.11
11 error path /home/pi/package.json
12 error code ENOENT
13 error errno -2
14 error syscall open
15 error enoent ENOENT: no such file or directory, open '/home/pi/package.json’
15 error enoent This is most likely not a problem with npm itself
15 error enoent and is related to npm not being able to find a file.
16 verbose exit [ -2, true ] -
What does the pimatic-daemon.log say?
-
The last retarts say that
19:04:35.403 2018-03-21 Wednesday
19:06:28.905 2018-03-21 Wednesday
19:07:50.484 2018-03-21 Wednesday -
Please stop the pimatic service and start pimatic manually via
sudo node node_modules/pimatic/pimatic.js
from pimatic-app folder.
-
Okay, this came out:
pi@raspberrypi:~/pimatic-app $ sudo node node_modules/pimatic/pimatic.js 20:05:49.219 2018-03-21 Wednesday 20:05:54.333 [pimatic] Starting pimatic version 0.9.42 Knex: run $ npm install sqlite3 --save Error: Cannot find module '/home/pi/pimatic-app/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/home/pi/pimatic-app/node_modules/sqlite3/lib/sqlite3.js:4:15) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (/home/pi/pimatic-app/node_modules/pimatic/node_modules/coffee-script/lib/coffee-script/register.js:45:36) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Client_SQLite3._driver (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/lib/dialects/sqlite3/index.js:75:12) at Client_SQLite3.initializeDriver (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/lib/client.js:219:26) at Client_SQLite3.Client (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/lib/client.js:113:10) at new Client_SQLite3 (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/lib/dialects/sqlite3/index.js:58:20) at Knex (/home/pi/pimatic-app/node_modules/pimatic/node_modules/knex/lib/index.js:60:34) at /home/pi/pimatic-app/node_modules/pimatic/lib/database.coffee:78:17 at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromiseCtx (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:606:10) at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:138:12) at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:143:10) at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:17:14) at processImmediate [as _immediateCallback] (timers.js:383:17) pi@raspberrypi:~/pimatic-app $
-
and again:
sudo rm -rf /home/pi/pimatic-app/node_modules/sqlite3 cd /home/pi/pimatic-app sudo npm install sqlite3
-
This came out
pi@raspberrypi:~ $ sudo rm -rf /home/pi/pimatic-app/node_modues/sqlite3 pi@raspberrypi:~ $ cd /home/pi/pimatic-app pi@raspberrypi:~/pimatic-app $ sudo npm install sqlite3 | > sqlite3@4.0.0 install /home/pi/pimatic-app/node_modules/sqlite3 > node-pre-gyp install --fallback-to-build node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.0/node-v46-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for sqlite3@4.0.0 and node@4.6.2 (node-v46 ABI, glibc) (falling back to source compile with node-gyp) gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.6.2" gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/pimatic-app/node_modules/sqlite3/.node-gyp" make: Verzeichnis „/home/pi/pimatic-app/node_modules/sqlite3/build“ wird betreten make: *** Keine Regel vorhanden, um das Ziel „../.node-gyp/4.6.2/include/node/common.gypi“, benötigt von „Makefile“, zu erstellen. Schluss. make: Verzeichnis „/home/pi/pimatic-app/node_modules/sqlite3/build“ wird verlassen gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12) gyp ERR! System Linux 4.9.59-v7+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/pimatic-app/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/pi/pimatic-app/node_modules/sqlite3/lib/binding/node-v46-linux-arm" "--node_abi_napi=node-v46" gyp ERR! cwd /home/pi/pimatic-app/node_modules/sqlite3 gyp ERR! node -v v4.6.2 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/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/pimatic-app/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/pimatic-app/node_modules/sqlite3/lib/binding/node-v46-linux-arm --node_abi_napi=node-v46' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/pimatic-app/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:87:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:854:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5) node-pre-gyp ERR! System Linux 4.9.59-v7+ node-pre-gyp ERR! command "/usr/local/bin/node" "/home/pi/pimatic-app/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/pi/pimatic-app/node_modules/sqlite3 node-pre-gyp ERR! node -v v4.6.2 node-pre-gyp ERR! node-pre-gyp -v v0.9.0 node-pre-gyp ERR! not ok Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/pimatic-app/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/pimatic-app/node_modules/sqlite3/lib/binding/node-v46-linux-arm --node_abi_napi=node-v46' (1) npm ERR! Linux 4.9.59-v7+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "sqlite3" npm ERR! node v4.6.2 npm ERR! npm v2.15.11 npm ERR! code ELIFECYCLE npm ERR! sqlite3@4.0.0 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sqlite3@4.0.0 install script 'node-pre-gyp install --fallback-to-build'. npm ERR! This is most likely a problem with the sqlite3 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 sqlite3 npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls sqlite3 npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/pimatic-app/npm-debug.log pi@raspberrypi:~/pimatic-app $
-
try in pimatic-app folder
sudo rm -rf node_modules/sqlite3 sudo npm install sqlit3@3.1.8