Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Cannot find module 'ip' #545

Closed
shanse01 opened this issue Feb 18, 2024 · 8 comments
Closed

Bug: Cannot find module 'ip' #545

shanse01 opened this issue Feb 18, 2024 · 8 comments
Assignees
Labels
bug 🐛 There is at least high chance that it is a bug!

Comments

@shanse01
Copy link

Your Current NRCHKB Plugin Version

1.6.0

Operating System

Debian GNU/Linux Bookworm (12) on PI

How can we help?

When ever setting up a service node and deploying it I get the following error messages:

"Error: Cannot find module 'ip'
Require stack:

  • /home/shanse01/.node-red/node_modules/node-red-contrib-homekit-bridged/build/lib/cameraSource/index.js
  • /home/shanse01/.node-red/node_modules/node-red-contrib-homekit-bridged/build/lib/utils/ServiceUtils.js
  • /home/shanse01/.node-red/node_modules/node-red-contrib-homekit-bridged/build/lib/HAPServiceNode.js
  • /home/shanse01/.node-red/node_modules/node-red-contrib-homekit-bridged/build/nodes/service.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
  • /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
  • /usr/lib/node_modules/node-red/lib/red.js
  • /usr/lib/node_modules/node-red/red.js"

Any help is highly appreciated

Any more details?

If this is specific to some hardware or specific software version, please explain here.

Any code or functions to add?

[
    {
        "id": "c39ad1c262410fce",
        "type": "homekit-service",
        "z": "4baa935e0ec6845d",
        "isParent": true,
        "hostType": "0",
        "bridge": "b55c79a875914608",
        "accessoryId": "",
        "parentService": "",
        "name": "testb",
        "serviceName": "Lightbulb",
        "topic": "",
        "filter": false,
        "manufacturer": "NRCHKB",
        "model": "1.6.0",
        "serialNo": "Default Serial Number",
        "firmwareRev": "1.6.0",
        "hardwareRev": "1.6.0",
        "softwareRev": "1.6.0",
        "cameraConfigVideoProcessor": "ffmpeg",
        "cameraConfigSource": "",
        "cameraConfigStillImageSource": "",
        "cameraConfigMaxStreams": 2,
        "cameraConfigMaxWidth": 1280,
        "cameraConfigMaxHeight": 720,
        "cameraConfigMaxFPS": 10,
        "cameraConfigMaxBitrate": 300,
        "cameraConfigVideoCodec": "libx264",
        "cameraConfigAudioCodec": "libfdk_aac",
        "cameraConfigAudio": false,
        "cameraConfigPacketSize": 1316,
        "cameraConfigVerticalFlip": false,
        "cameraConfigHorizontalFlip": false,
        "cameraConfigMapVideo": "0:0",
        "cameraConfigMapAudio": "0:1",
        "cameraConfigVideoFilter": "scale=1280:720",
        "cameraConfigAdditionalCommandLine": "-tune zerolatency",
        "cameraConfigDebug": false,
        "cameraConfigSnapshotOutput": "disabled",
        "cameraConfigInterfaceName": "",
        "characteristicProperties": "{}",
        "waitForSetupMsg": false,
        "outputs": 2,
        "x": 410,
        "y": 440,
        "wires": [
            [
                "d8c6f2cf1ff5d966"
            ],
            []
        ]
    },
    {
        "id": "b55c79a875914608",
        "type": "homekit-bridge",
        "bridgeName": "test",
        "pinCode": "xxxx-xxxx",
        "port": "",
        "advertiser": "bonjour-hap",
        "allowInsecureRequest": false,
        "manufacturer": "NRCHKB",
        "model": "1.6.0",
        "serialNo": "Default Serial Number",
        "firmwareRev": "1.6.0",
        "hardwareRev": "1.6.0",
        "softwareRev": "1.6.0",
        "customMdnsConfig": false,
        "mdnsMulticast": true,
        "mdnsInterface": "",
        "mdnsPort": "",
        "mdnsIp": "",
        "mdnsTtl": "",
        "mdnsLoopback": true,
        "mdnsReuseAddr": true,
        "allowMessagePassthrough": true
    }
]
@shanse01 shanse01 added the question Further information is requested label Feb 18, 2024
@crxporter
Copy link
Member

@Shaquu is this related to the current discord discussion? I saw you mention ip module. Does it need manual install? Could / should it be added as a dependency on our node so it installs automatically?

@caitken-com
Copy link

@shanse01 in the mean time try this solution: #544

@shanse01
Copy link
Author

@caitken-com Thanks for the hint, does this relate to node-red-contrib-ip, if so, tried it but no change.

@caitken-com
Copy link

@shanse01 I believe this what you’re looking for: https://www.npmjs.com/package/ip

@crxporter
Copy link
Member

crxporter commented Feb 18, 2024

To install for nodered you would go to the .node-red directory (usually located at ~/.node-red/ but depends on how you install) then run npm install ip - then restart nodered

@shanse01
Copy link
Author

@crxporter Thanks that did the trick for the node-red installed parallel to the hombridge, do you know by chance where the ip node would have to be installed if I were to use the "Node Red plugin for Homebridge" inside Hombridge?

@Shaquu
Copy link
Member

Shaquu commented Feb 19, 2024

Will be resolved with next version

Shaquu added a commit that referenced this issue Feb 19, 2024
@Shaquu Shaquu changed the title Help needed on "Cannot find module . . ." Bug: Cannot find module 'ip' Feb 19, 2024
@Shaquu Shaquu added bug 🐛 There is at least high chance that it is a bug! and removed question Further information is requested labels Feb 19, 2024
Shaquu added a commit that referenced this issue Feb 19, 2024
### Fixed

- Bug: Cannot find module 'ip' [#545](#545)
@Shaquu
Copy link
Member

Shaquu commented Jun 15, 2024

ip removed in 1.7.0-dev.0

@Shaquu Shaquu closed this as completed Jun 15, 2024
Shaquu added a commit that referenced this issue Sep 19, 2024
### Fixed

- Removed vulnerable module 'ip' [#545](#545)
- msg.context now handled properly

### Added

- Adaptive Lighting support [#335](#335)
- By default, registered Eve.app Characteristics for power management - for existing setup, requires old custom characteristics file to be removed

### Changed

- Updated hap-nodejs [0.11.1 to 0.12.3-beta.18](https://github.com/homebridge/HAP-NodeJS/blob/latest/CHANGELOG.md) (features
  and bug fixes)
- Dependencies upgrade
- Node `10`, `12` and `16` no longer supported, use Node 20! Or at least 18
- Updated GitHub Actions
- Some trivial PinCodes are no longer allowed
- MDNS Configuration is now deprecated, use Bind instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 There is at least high chance that it is a bug!
Projects
None yet
Development

No branches or pull requests

4 participants