OpenZWave / node-openzwave-shared

OpenZWave addon for Node.js (all versions) including management and security functions
Other
199 stars 113 forks source link

npn errors #237

Closed SteveRMann closed 6 years ago

SteveRMann commented 6 years ago

Tried to follow the instructions, but two problems came up. First, "Go to your project directory, cd /". What project directory?

Second, the instruction line: "npm node-openzwave-shared" is wrong, I suspect you mean "npm install node-openzwave-shared". But when I do, I get the following error:

Not found : node-openzwave-shared npm ERR! 404 'node-openzwave-shared' is not in the npm registry. npm ERR! 404 You should bug the author to publish it...

So, I am stuck at step three.

ekarak commented 6 years ago

the NPM package name is 'openzwave-shared', apologies for the confusion. BTW which instructions are you following? this typo was fixed some time ago.

SteveRMann commented 6 years ago

Thanks for the prompt reply.. I am using the instructions in: https://raspberrypihq.com/how-to-create-a-z-wave-smart-home-hub-using-a-raspberry-pi/ Which looks like a copy of the instructions in this git: https://github.com/OpenZWave/node-openzwave-shared/blob/master/README-raspbian.md And the confusing Step three is corrected in the git.

But, in Step three, what is meant by "project directory"?

Thanks again.

ekarak commented 6 years ago

When running npm install <package> without the -g (global) option then npm will install it locally in your project directory (wherever that might be) under a subdirectory called node_modules. In case you just want to experiment you can simply use any directory (or your home directory) just make sure to remember running node from that same directory when doing a require('openzwave-shared').

ekarak commented 6 years ago

resolving

SteveRMann commented 6 years ago

Makes sense. I am trying to use Node Red to talk to some ZWave devices. I am using the Pi that is also my MQTT broker as the ZWave hub with the Aeotek ZStick.

So, the "last" step says to install npm install node-red-contrib-openzwave in ~/.node-red. With that environment, where would you put node-openzwave-shared?

I have no plans to write any other code for ZWave, I just want to use Node Red in my home IOT.

ekarak commented 6 years ago

you should install openzwave-shared under .node-red then.

On Fri, 29 Jun 2018, 22:35 SteveRMann, notifications@github.com wrote:

Makes sense. I am trying to use Node Red to talk to some ZWave devices, using the Pi that is also my MQTT broker as the ZWave hub using the Aeotek ZStick.

So, the "last" step says to install npm install node-red-contrib-openzwave in ~/.node-red. With that environment, where would you put node-openzwave-shared?

I have no plans to write any other code for ZWave, I just want to use Node Red in my home IOT.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/237#issuecomment-401453134, or mute the thread https://github.com/notifications/unsubscribe-auth/AAj4KT5YNr7WSSreoCHYZ_nYlEV8SzPMks5uBoFmgaJpZM4U9eyi .

SteveRMann commented 6 years ago

Many thanks, that's exactly the info I've been looking for.

SteveRMann commented 6 years ago

I give up. Copied a fresh SD (from a backup of my working system) and followed the instructions in the git, and step three: cd ~/.node-red npm install openzwave-shared You can test node-openzwave-shared wget https://raw.githubusercontent.com/OpenZWave/node-openzwave-shared/master/test2.js node test2.js still fails with tons of "... cannot find module..." errors.