Closed NSEchris closed 7 years ago
I just did a clean install on a RPI and experienced the same issue. One thing that looked odd was the structure of ~/.node-red/node_modules
- rather than being a tree of dependencies, it was flat. I will need to investigate further.
If I install this package using npm@2 (sudo npm install -g npm@2.x
) I get the tree structure expected and the lifx nodes appear in the node-red palette. (macOS, node-red 0.15.1, Node.js 6.6.0, npm 2.15.11)
I am away from RPI right now, so I can't confirm whether using npm@2 fixes what I observed earlier. I will try when I get a chance.
Issue appears to have been introduced in v1.0.2 of lifx-http-api. The package.json on github includes the following change:
- "main": "source/lifx.js",
+ "main": "dist/lifx.js",
... however the image of the package.json included in npm install (1.0.2) is not reflective of this change and still points to source/lifx.js
which does not exist. Have raised an issue on that project.
npm version 1.0.1 includes a temporary fix for this issue.
Thanks for jumping on this right away and working out the solution! I can confirm that installing 1.0.1 did resolve the node-red launch error, and the nodes are available on the palette. I didn't have time to test it's functionality, but I will do that tonight. Thanks again, I really appreciate that you created this node!
On Mon, Jan 30, 2017 at 2:27 AM alisdairjsmyth notifications@github.com wrote:
Closed #1 https://github.com/alisdairjsmyth/node-red-contrib-lifx-api/issues/1.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alisdairjsmyth/node-red-contrib-lifx-api/issues/1#event-940914523, or mute the thread https://github.com/notifications/unsubscribe-auth/AYDtCM99hFYzfv470cWUStFIjO2lGe-aks5rXZDKgaJpZM4Lw3F7 .
I'm new at node, npm, node-red, etc. I tried installing node-red-contrib-lifx-api on these versions, and have not been successful getting the nodes to show up on the palette:
I tried the various versions because I read there were issues with certain versions of these packages, and hoped I'd get lucky and happen to find a combo that works.
The console shows a warning message when starting node-red of "[lifx-api] Error: Cannot find module 'lifx-http-api'"
This could be as simple as I don't know the proper procedure to install the nodejs dependency, but I don't know. I would really appreciate any help you could offer.
PS - I do have a different lifx node working, but it doesn't provide a way to use the effects.