richierockskool / homebridge-inkbird-wifi-gateway

homebridge Inkbird wifi gateway
https://github.com/richierockskool/homebridge-inkbird-wifi-gateway
Apache License 2.0
7 stars 6 forks source link

Same, to fix the problem, just edit the `main` property in `package.json` from `index.js` to `src/index.js`. #4

Open richierockskool opened 1 year ago

richierockskool commented 1 year ago

Same, to fix the problem, just edit the main property in package.json from index.js to src/index.js.

obrazek

EDIT: The issue has been fixed in the repo, the author just needs to push the latest version to npm.

Originally posted by @HonbraDev in https://github.com/tonesto7/homebridge-smartthings/issues/431#issuecomment-858029924

richierockskool commented 1 year ago

https://github.com/richierockskool/homebridge-inkbird-wifi-gateway

ERROR LOADING PLUGIN homebridge-inkbird-wifi-gateway: [7/17/2022, 5:43:31 PM] Error: Cannot find module '/usr/local/lib/node_modules/homebridge-inkbird-gateway/src/index.js' Require stack:

ShaunRoberts543 commented 1 year ago

As a noob to coding, how do I edit the package.json?

richierockskool commented 1 year ago

I think you have to clone the project and then it will allow you to edit, or bring it init VS code, I have never done it before.

HonbraDev commented 1 year ago

Does GitHub have a repost feature? If so, why was my comment reposted here? It seems like bots spam-mention issues for some reason.

marcap02 commented 1 year ago

I have the exact same issue and package.json has "dist" already added: "main": "dist/index.js",

Also, the "list" folder seems to be missing:

root@home:/usr/lib/node_modules/homebridge-inkbird-wifi-gateway# ls
LICENSE  README.md  SECURITY.md  config.schema.json  node_modules  package.json

Would be happy about a resolution as I'd love to monitor my hot tub temp in the home app. Full error message:

[12/12/2022, 6:12:25 PM] ====================
[12/12/2022, 6:12:25 PM] ERROR LOADING PLUGIN homebridge-inkbird-wifi-gateway:
[12/12/2022, 6:12:25 PM] Error: Cannot find module '/usr/lib/node_modules/homebridge-inkbird-wifi-gateway/dist/index.js' imported from /usr/lib/node_modules/homebridge/lib/plugin.js
    at new NodeError (node:internal/errors:387:5)
    at finalizeResolution (node:internal/modules/esm/resolve:429:11)
    at moduleResolve (node:internal/modules/esm/resolve:1006:10)
    at defaultResolve (node:internal/modules/esm/resolve:1214:11)
    at nextResolve (node:internal/modules/esm/loader:165:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:844:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:431:18)
    at ESMLoader.import (node:internal/modules/esm/loader:528:22)
    at importModuleDynamically (node:internal/modules/cjs/loader:1065:29)
    at importModuleDynamicallyWrapper (node:internal/vm/module:438:21)
[12/12/2022, 6:12:25 PM] ====================
sebaslag commented 1 year ago

I have the exact same issue and package.json has "dist" already added: "main": "dist/index.js",

Also, the "list" folder seems to be missing:

root@home:/usr/lib/node_modules/homebridge-inkbird-wifi-gateway# ls
LICENSE  README.md  SECURITY.md  config.schema.json  node_modules  package.json

Would be happy about a resolution as I'd love to monitor my hot tub temp in the home app. Full error message:

[12/12/2022, 6:12:25 PM] ====================
[12/12/2022, 6:12:25 PM] ERROR LOADING PLUGIN homebridge-inkbird-wifi-gateway:
[12/12/2022, 6:12:25 PM] Error: Cannot find module '/usr/lib/node_modules/homebridge-inkbird-wifi-gateway/dist/index.js' imported from /usr/lib/node_modules/homebridge/lib/plugin.js
    at new NodeError (node:internal/errors:387:5)
    at finalizeResolution (node:internal/modules/esm/resolve:429:11)
    at moduleResolve (node:internal/modules/esm/resolve:1006:10)
    at defaultResolve (node:internal/modules/esm/resolve:1214:11)
    at nextResolve (node:internal/modules/esm/loader:165:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:844:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:431:18)
    at ESMLoader.import (node:internal/modules/esm/loader:528:22)
    at importModuleDynamically (node:internal/modules/cjs/loader:1065:29)
    at importModuleDynamicallyWrapper (node:internal/vm/module:438:21)
[12/12/2022, 6:12:25 PM] ====================

Same error please help me!

sebaslag commented 1 year ago

Same, to fix the problem, just edit the main property in package.json from index.js to src/index.js.

obrazek

EDIT: The issue has been fixed in the repo, the author just needs to push the latest version to npm.

Originally posted by @HonbraDev in tonesto7/homebridge-smartthings#431 (comment)

the index.js is not present in dans src folder

HonbraDev commented 1 year ago

:pingsock:

sebaslag commented 1 year ago

sudo -E -n npm install -g homebridge-inkbird-wifi-gateway@1.0.3 npm WARN tar ENOENT: Cannot cd into '/usr/lib/node_modules/homebridge-inkbird-wifi-gateway/node_modules/homebridge-inkbird-wifi-gateway' npm WARN tarball tarball data for homebridge-inkbird-wifi-gateway@git+ssh://git@github.com/richierockskool/homebridge-inkbird-wifi-gateway.git#a9271e8d00a593a87242ca654713a77ffaf27c7d (null) seems to be corrupted. Trying again. npm WARN tar ENOENT: Cannot cd into '/usr/lib/node_modules/homebridge-inkbird-wifi-gateway/node_modules/homebridge-inkbird-wifi-gateway' npm WARN tarball tarball data for homebridge-inkbird-wifi-gateway@git+ssh://git@github.com/richierockskool/homebridge-inkbird-wifi-gateway.git#a9271e8d00a593a87242ca654713a77ffaf27c7d (null) seems to be corrupted. Trying again. npm ERR! code ENOENT npm ERR! path /usr/lib/node_modules/homebridge-inkbird-wifi-gateway/node_modules/homebridge-inkbird-wifi-gateway npm ERR! enoent ENOENT: Cannot cd into '/usr/lib/node_modules/homebridge-inkbird-wifi-gateway/node_modules/homebridge-inkbird-wifi-gateway' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

highlandery commented 1 year ago

Also having this problem. Plugin will not install.