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
Pimatic startup error
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
pi@raspberrypi:~/pimatic-app $ sudo rm -rf node_modules/sqlite3
pi@raspberrypi:~/pimatic-app $ sudo npm install sqlite@3.1.8
npm ERR! Linux 4.9.59-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "sqlite@3.1.8"
npm ERR! node v4.6.2
npm ERR! npm v2.15.11
npm ERR! version not found: sqlite@3.1.8
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/pimatic-app/npm-debug.log
Sorry, input error, here again correctly
pi@raspberrypi:~/pimatic-app $ sudo rm -rf node_modules/sqlite3
pi@raspberrypi:~/pimatic-app $ sudo npm install sqlite3@3.1.8
/
> sqlite3@3.1.8 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/v3.1.8/node-v46-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.8 and node@4.6.2 (node-v46 ABI) (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"
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' (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.6.31
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' (1)
npm ERR! Linux 4.9.59-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "sqlite3@3.1.8"
npm ERR! node v4.6.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! sqlite3@3.1.8 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@3.1.8 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 $
Well, I don’t have more ideas…
I just don’t understand what I did differently the first time that it worked there…
I reinstalled the operating system one more time,
when installing npm this message came up:
pi@raspberrypi:~ $ npm install pimatic --prefix pimatic-app --production
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
> typechecker@2.0.8 preinstall /home/pi/pimatic-app/node_modules/pimatic/node_modules/i18n/node_modules/messageformat/node_modules/watchr/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js
> typechecker@2.0.8 preinstall /home/pi/pimatic-app/node_modules/pimatic/node_modules/i18n/node_modules/messageformat/node_modules/watchr/node_modules/extendr/node_modules/typechecker
> node ./cyclic.js
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/pimatic-app/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/pimatic-app/package.json'
npm WARN pimatic-app No description
npm WARN pimatic-app No repository field.
npm WARN pimatic-app No README data
npm WARN pimatic-app No license field.
+ pimatic@0.9.42
added 625 packages in 82.659s
Could that be it?
@schulz again the package.json…
Please try there commands;
sudo rm -r /home/pi/pimatic-app
cd /home/pi
ls
mkdir pimatic-app
npm install pimatic --prefix pimatic-app --production
Please copy terminal outputs because i want to see what your folder structure is
@gleno0h In the meantime I did several new installations of the operating system and then tried to install node.js differently using the following instructions:
link texthttps://crycode.de/installation-von-node-js
With the middle version (node.js 6.x) Pimatic finally started normally!
I was able to log in normally on the web interface and thought now everything is finally back to normal, but the next problem is already appearing!
When I want to add a device I always get this message:
error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:45:33error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:44:39error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:43:47error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:43:41error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:37:15error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:34:58error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:34:29error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:31:33error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
11:28:13error [pimatic-mobile-frontend]: Client error: Cannot read property ‘length’ of undefined
What could be the reason again???
Clear browser cache and reload the page
It works
Thank you very much
now I can focus on the original problem again, with css-injekt…
I’ll change back to the other thread and hope for your support!
Thank you again
Backup you installation first please or clone your whole SD card.
What is the best way to backup the installation?
I would use Win32DiskImager and backup the whole SD Card to an image.
In this case the old status will be available again in less than 15 minutes.
Backed up the whole image, but took more than 7 hours with Windows 7!