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
-
Released pimatic@0.9.43
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.3cat /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 addedNODE_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 asudo 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 asudo 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
-
This post is deleted!
-
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
-
found on github - what about pimatic@0.9.44a
-
@nofrog Seems to include just i18n changes necessary for a successful build. @mwittig did the changes. Maybe he can tell more.
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 -
This is a release for testing this. See
https://forum.pimatic.org/topic/4432/install-pimatic-failing/15"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
As @KaiR figured out, the release 0.9.43 seems to be running stable with node 8 (at least with the default config, no guarantee for your setup).
I’ve adapted the installation guide from https://pimatic.teamemo.com/Guide/Getting-Started:$ wget https://nodejs.org/dist/latest-v8.x/node-v8.15.0-linux-armv7l.tar.gz -P /tmp $ cd /usr/local $ sudo tar xzvf /tmp/node-v8.15.0-linux-armv7l.tar.gz --strip=1 $ sudo apt-get install build-essential git $ cd /home/pi $ mkdir pimatic-app $ npm install pimatic --prefix pimatic-app --production $ cd pimatic-app $ node node_modules/pimatic/pimatic.js
If you have node 4 installed you may follow this instructions to delete it before.
Please make sure you have a backup of your system! There is no guarantee that this procedure will work for your system!
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 -
i tried .43 also on my mac and installed pimatic-raspbee. it works fine. while with your node_v8 version @michbeck100 it doesn’t without doing changes. you know why?
-
@sweebee said in Released pimatic@0.9.43:
you know why?
Yes, because I also switched to CoffeeScript 2 with ES6 compatibility. See here: https://forum.pimatic.org/topic/4509/node-v8-plugin-compatibility/8
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 -
@sweebee Yes?
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