@syrisara said in Released pimatic@0.9.43:
Sudo npn install trows me an error, can somebody help?
Which Node.js version do you have installed?
node --version
Released pimatic@0.9.43
@syrisara said in Released pimatic@0.9.43:
Sudo npn install trows me an error, can somebody help?
Which Node.js version do you have installed?
node --version
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
It’s version v4.8.4
What’s about my problem? Can someone help me?
My node version is v4.6.2
Is the update fixed or still buggy?
@miss-erfolg My update check also show this message.
Could not get plugin info from update server, request info from npm
Follow my domotica project on http://maredana.nl
Today it works.
Did the update server have a problem with the last few days?
@stokstaart said in Released pimatic@0.9.43:
@mwittig said in Released pimatic@0.9.43:
@elektronaut Thanks for reporting. I am glad it worked for you and this may also help other users to overcome the issues
Does this mean this is no longer under investigation?
I cannot start my Docker container anymore so unless somebody is able to solve this by altering the configfile i have lost all my historical data, not too happy with that…
For future references, and perhaps other users, I would advise the following options when running Pimatic in a docker:
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
@koffienl said in Released pimatic@0.9.43:
For future references, and perhaps other users, I would advise the following options when running Pimatic in a docker:
- Mail the config.json to your personal mail once a week with a rule
- Configure the docker container to forward a local config.json file to pimatic-app/config.json inside the folder
- Configure the docker container to forward a local pimatic-database.sqlite file to pimatic-app/pimatic-database.sqlite inside the folder or :
- Configre pimatic to use MySQL as database outside the docker, so you an easily backup and restore your historical data
Good tips. Additionally i would suggest to not use pimatic.js directly as ENTRYPOINT. If Pimatic crashes, the docker container is stopped too. So there‘s no chance to exec a bash shell into the running container and investigate the problem. I‘m using a wrapper script instead, which runs pimatic.js daemonized in the background. This allows me also to restart Pimatic in the webinterface.
what I find kind of “funny”:
the last post here is 19 days ago, and still I was able to f*** up my installation today.
is there no way to disable the 9.0.43 update that no other users run into this problem?
I had this issue at the day the update was pushed out. Since then I have done several other updates to 0.9.43 but always manual from command line: npm update pimatic
without any problems
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
No problems here either…Update just fine. Even in a new install to a whole new project 4 days ago went ok.
I have had the exact same errors during install and there was no way to fix it. I tried all options mentioned here like the backup and do a new install “npm install pimatic --prefix pimatic-app --production”, or the “sudo npm install pimatic@0.9.42 --prefix pimatic-app --production”.
Nothing! The 0.9.43 did not install correct. The 0.9.42 installed correctly but would not start.
I did the upgrade (tried the upgrade) just yesterday evening after my holidays.
So after a couple of hours trying, I finally restored pimatic from my (last week) Sat/Sun full server backup.
Now I’m back on 0.9.42
It is globally installed and it is autostarted via the init.d script. Next to that it is “ssl-ed” and running on a 443 port.
Updates mentions (now again):
Found update for pimatic: current version is 0.9.42, latest version is: 0.9.43
Found update for pimatic-knmi-weather: current version is 0.9.3, latest version is: 0.9.4
Found update for pimatic-telegram: current version is 1.1.10, latest version is: 1.1.11
Plugins installed:
"plugins": [
{
"plugin": "cron"
},
{
"plugin": "mobile-frontend",
"customTitle": "DomoPi"
},
{
"plugin": "shell-execute"
},
{
"plugin": "openweather",
"apiKey": "e28b473c8de9dea45e756481edc444b4"
},
{
"plugin": "homeduino",
"driver": "serialport",
"driverOptions": {
"serialDevice": "/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0",
"baudrate": 115200
},
"receiverPin": 0,
"transmitterPin": 4,
"enableReceiving": true,
"active": true
},
{
"plugin": "sunrise",
"latitude": 52.48278,
"longitude": 6.12428
},
{
"plugin": "iframe",
"active": true
},
{
"interval": 31,
"plugin": "knmi-weather",
"active": true
},
{
"plugin": "sysinfo",
"active": true
},
{
"apiToken": "<removed>",
"recipients": [
{
"name": "Harry",
"userChatId": "<removed>",
"enabled": true
},
{
"name": "Margreet",
"userChatId": "<removed>",
"enabled": true
}
],
"plugin": "telegram",
"active": true
}
],
Running on:
Raspberry Pi3, did a “sudo apt-get update; sudo apt-get upgrade” before updating my pimatic to 0.9.43.
uname -a: Linux RPi3 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
node --version: v4.8.3
cat /etc/os-release:
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Anything else you need to know to track this back to it’s errors?
Some further tries. Did the update again from pimatic and I will only list the errors. It is still very extensive as to give you insight in what happens:
Error: Cannot find module './dir-reader.js'
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 Packer.Reader (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream/lib/reader.js:53:19)
at Packer.DirReader (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream/lib/dir-reader.js:35:10)
at Packer.IgnoreReader (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js:68:13)
at new Packer (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream-npm/fstream-npm.js:23:10)
at pack_ (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/lib/utils/tar.js:48:3)
at Object.pack (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/lib/utils/tar.js:43:5)
Error: Cannot find module './dir-reader.js'
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 Packer.Reader (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream/lib/reader.js:53:19)
at Packer.DirReader (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream/lib/dir-reader.js:35:10)
at Packer.IgnoreReader (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js:68:13)
at new Packer (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream-npm/fstream-npm.js:23:10)
at pack_ (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/lib/utils/tar.js:48:3)
at Object.pack (/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/lib/utils/tar.js:43:5)
npm ERR! cb() never called!
module.js:327
throw err;
^
Error: Cannot find module 'npm'
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/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/ppm.js:9:11)
at Module._compile (module.js:409:26)
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 Function.Module.runMain (module.js:441:10)
module.js:327
throw err;
^
Error: Cannot find module 'npm'
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/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/ppm.js:9:11)
at Module._compile (module.js:409:26)
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 Function.Module.runMain (module.js:441:10)
And restored again and now it is running again on 0.9.42.
When tracking this further (google) I found for the Error: Cannot find module 'npm'
the following check:
harryvanderwolf@RPi3:~/pimatic$ which npm
/usr/local/bin/npm
harryvanderwolf@RPi3:~/pimatic$ which node
/usr/local/bin/node
harryvanderwolf@RPi3:~/pimatic$ echo $NODE_PATH
harryvanderwolf@RPi3:~/pimatic$
The NODE_PATH is misssing.
So I added NODE_PATH="/usr/local/bin"
to my system wide /etc/profile and rebooted.
Then I did the upgrade again from pimatic, but it still failed. It is not in the package.json b.t.w.
Then I did a restore again, I removed NODE_PATH again from my /etc/profile and did a sudo npm install dir-reader
.
Then again an update from pimatic but it still didn’t work as it still mentions “dir-reader.js not found”. (sigh) So a restore again.
Then I first did a sudo npm cache clean
and then the upgrade. It still crashes on the exact same errors (sigh).
Restored again and I now leave it to 0.9.42 for the time being.
(If NODE_PATH gets added to the package.json of the pimatic package, will it solve this issue?)
Problem is that stream is missing the file dir-reader.js. So it won’t help to install dir-reader using npm.
Please check if the file /home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream/lib/dir-reader.js
is really missing.
If its missing you can try to install fstream again. Remove
/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/node_modules/fstream
completely and run
sudo npm install
from
/home/harryvanderwolf/pimatic/pimatic-app/node_modules/pimatic/node_modules/npm/
.
This should install fstream again, hopefully including the missing file.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten
Thanks for your reply.
However, I do have the file dir-reader.js in fstream in my local pimatic-app folder as well as in /usr/local/lib, and they are identical.
Next to that: I have multiple versions of dir-reader.js also under other modules like sqlite3 in my pimatic-app modules folder structure.
However, I do have the file dir-reader.js in fstream in my local pimatic-app folder as well as in /usr/local/lib, and they are identical.
Not sure why there is one in /usr/local/lib. It shouldn’t have any effect.
Next to that: I have multiple versions of dir-reader.js also under other modules like sqlite3 in my pimatic-app modules folder structure.
Same with me. That’s normal, because fstream seems to be a popular library. Nevertheless you still try do delete fstream from there and install it again like I wrote before. It’s worth a try, and I think i fixed it this way, too.
pimatic-hap - pimatic HomeKit bridge
pimatic-echo - Amazon echo integration
pimatic-dash-button - Amazon dash button support
pimatic-alarm - pimatic alarm system
Like my work? Then consider a donation
Follow me: https://twitter.com/michaelkotten
@michbeck100 said in Released pimatic@0.9.43:
Same with me. That’s normal, because fstream seems to be a popular library. Nevertheless you still try do delete fstream from there and install it again like I wrote before. It’s worth a try, and I think i fixed it this way, too.
Removed it and reinstalled it. Rebooted and did the upgrade and again it doesn’t work and keeps complaining about the dir-reader.js npm not found.
I’m so experienced in restoring now.
Anybody still experience the error, it worked today with the following:
Running npm update pimatic
from the terminal and after a restart of pimatic, running the webupdater for the plugins, everything went ok without any errors
$ npm -v 2.15.11
$ nodejs -v v4.9.1
I tried that and it seemed to have worked at first but after restart of the system pimatic will not start with the known errors