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

0.4.0 fails to load, 0.3.5 loads fine #21

Open
ihatemyisp opened this issue Apr 7, 2022 · 2 comments
Open

0.4.0 fails to load, 0.3.5 loads fine #21

ihatemyisp opened this issue Apr 7, 2022 · 2 comments

Comments

@ihatemyisp
Copy link

NodeJS: 14.9.1
Homebridge: 1.4.0

[4/6/2022, 8:02:33 PM] ERROR LOADING PLUGIN homebridge-eufy:
[4/6/2022, 8:02:33 PM] /usr/lib/node_modules/homebridge-eufy/node_modules/node-eufy-api/lib/index.js:1
import fetch from "node-fetch";
^^^^^^
SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:1001:16)
    at Module._compile (internal/modules/cjs/loader.js:1049:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-eufy/lib/index.js:2:23)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
[4/6/2022, 8:02:33 PM] ====================

I saw #20 and think this might be similar.

When I check node-eufy-api's package.json I see this:

  "_from": "node-eufy-api@^0.4.0",
  "_id": "node-eufy-api@0.4.1",
  "_inBundle": false,
  "_integrity": "sha512-m5Kg5USpK8r+rxEoF1fJtIZpt5Gb/DT+ze1T6b0h4tVc2skicdqxtRd0YB1j+pY6v/dqOzRUuMc1PQ+6BlXwMg==",
  "_location": "/homebridge-eufy/node-eufy-api",
  "_phantomChildren": {},
  "_requested": {
    "type": "range",
    "registry": true,
    "raw": "node-eufy-api@^0.4.0",
    "name": "node-eufy-api",
    "escapedName": "node-eufy-api",
    "rawSpec": "^0.4.0",
    "saveSpec": null,
    "fetchSpec": "^0.4.0"
  },

I don't know enough about node to tell if that means 0.4.1 or 0.4.0 is installed.

Either way, 0.3.5 works fine so I'll keep using that until I can get this resolved. Any ideas?

@ChadyG
Copy link

ChadyG commented Apr 8, 2022

Same error here

NodeJS: 14.9.1
NPM: 8.6.0
homebridge-eufy: 0.4.0
node-eufy-api: 0.4.1

@ibmaster
Copy link

ibmaster commented Dec 8, 2022

Does 0.4.0 version actually work for anybody??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants