michbeck100 / pimatic-hap

Pimatic homekit bridge
GNU General Public License v2.0
30 stars 10 forks source link

Cannot find module './accessories/contact' #16

Closed tjandt closed 8 years ago

tjandt commented 8 years ago

With Version 0.5.0 I'm getting the following error:

17:34:32.941 [pimatic] info: Loading plugin: "pimatic-hap" (0.5.0) 17:34:33.067 [pimatic] error: Cannot find module './accessories/contact'

Any ideas how to fix it?

michbeck100 commented 8 years ago

I didn't have this issue after updating, did you install the plugin using the config.json? Or did you copy it by yourself to node_modules? Just try to delete the directory node_modules/pimatic_hap. After a pimatic restart, it will be recreated and should be working.

bjornhij commented 8 years ago

Same issue here, also after removing the pimatic-hap directory and restarting:

20:33:57.244 [pimatic, npm] info: ├── color@0.10.1 (color-convert@0.5.3, color-string@0.3.0) 20:33:57.275 [pimatic, npm] info: └── hap-nodejs@0.0.7 (debug@2.2.0, node-persist@0.0.6, curve25519@1.1.0, srp@0.2.0, ed25519@0.0.3, mdns@2.2.11) 20:33:57.363 [pimatic] info: Loading plugin: "pimatic-hap" (0.5.0) coffee-cache: compiling coffee-script file "hap.coffee"...Done 20:33:57.980 [pimatic] error: Cannot find module './accessories/contact'

michbeck100 commented 8 years ago

Could you check if the directory node_modules/pimatic-hap/accessories exists, and if yes if there is a contact.coffee file?

bjornhij commented 8 years ago

No, I just checked that and it is not there:

root@hijmans:/usr/local/pimatic-app/node_modules/pimatic-hap# ls -la total 36 drwxrwsrwx 4 root root 4096 Jan 5 20:33 . drwxr-sr-x 30 root root 4096 Jan 5 20:31 .. -rw-r--r-- 1 root root 3211 Jan 3 00:09 hap.coffee -rw-r--r-- 1 root root 492 Nov 2 20:48 hap-config-schema.coffee drwxrwsrwx 2 root root 4096 Jan 5 20:33 .js drwxrwsrwx 5 root root 4096 Jan 5 20:31 node_modules -rw-r--r-- 1 root root 4432 Jan 5 20:31 package.json -rw-r--r-- 1 root root 3302 Jan 4 23:21 README.md

root@hijmans:/usr/local/pimatic-app/node_modules# find . -name contact.coffee root@hijmans:/usr/local/pimatic-app/node_modules#

bjornhij commented 8 years ago

Did you possibly forget to add the devices directory to the files section of the package.json?

michbeck100 commented 8 years ago

Shame on me, yes i did :-(. Already pushed the change ;-)

michbeck100 commented 8 years ago

I create a bugfix release now...

michbeck100 commented 8 years ago

0.5.1 is on the way to your pimatic instance ;-)

bjornhij commented 8 years ago

thx :)

tjandt commented 8 years ago

thanks both of you ;)