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

Gyp probleem #33

Open
remko2000 opened this issue Mar 21, 2020 · 7 comments
Open

Gyp probleem #33

remko2000 opened this issue Mar 21, 2020 · 7 comments

Comments

@remko2000
Copy link

remko2000 commented Mar 21, 2020

I ty to installe this plugin but I get:

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: tar.extract is not a function
gyp ERR! stack at Request. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:198:22)
gyp ERR! stack at Request.emit (events.js:323:22)
gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1066:10)
gyp ERR! stack at ClientRequest.emit (events.js:311:20)
gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:476:22)
gyp ERR! stack at TLSSocket.emit (events.js:311:20)
gyp ERR! stack at addChunk (_stream_readable.js:294:12)
gyp ERR! stack at readableAddChunk (_stream_readable.js:275:11)
gyp ERR! System Linux 4.19.97+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-klikaanklikuit/node_modules/rpio
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/nodejs/node-gyp/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

My raspberry is up to date with the last software so what can be the problem here?

@robertklep
Copy link
Owner

This issue (and specifically this comment) suggests it may be an issue with mixed installs (different versions of Node.js installed).

I notice that you're using [email protected], but the current version is [email protected] so it might be worthwhile to upgrade that package first and see if that fixes the problem:

$ sudo npm i -g node-gyp

In any case, it's not specifically an issue with homebridge-klikaanklikuit.

@remko2000
Copy link
Author

Strange, I updated gyp but still errors and it refers to the old gyp version:

pi@raspberrypi:~ $ sudo npm i -g node-gyp
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
/usr/local/bin/node-gyp -> /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js

  • [email protected]
    updated 1 package in 61.993s
    pi@raspberrypi:~ $ sudo npm install -g --unsafe-perm homebridge-klikaanklikuit

[email protected] install /usr/local/lib/node_modules/homebridge-klikaanklikuit/node_modules/rpio
node-gyp rebuild

gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: tar.extract is not a function
gyp ERR! stack at Request. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:198:22)
gyp ERR! stack at Request.emit (events.js:323:22)
gyp ERR! stack at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1066:10)
gyp ERR! stack at ClientRequest.emit (events.js:311:20)
gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:476:22)
gyp ERR! stack at TLSSocket.emit (events.js:311:20)
gyp ERR! stack at addChunk (_stream_readable.js:294:12)
gyp ERR! stack at readableAddChunk (_stream_readable.js:275:11)
gyp ERR! System Linux 4.19.97+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-klikaanklikuit/node_modules/rpio
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/nodejs/node-gyp/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-03-21T11_06_15_831Z-debug.log

@robertklep
Copy link
Owner

and it refers to the old gyp version

It looks like npm is using a version that is packaged specifically with it (installed in /usr/local/lib/node_modules/npm/node_modules/node-gyp/).

Which version of npm are you using? Perhaps that's needs upgrading too (sudo npm i -g npm).

@remko2000
Copy link
Author

remko2000 commented Mar 22, 2020

Indeed after updating npm I could install. Now I'm struggling with the json. Is there maybe a error in it?
This is my config now:

{
"bridge": {
"name": "Homebridge 82AE",
"username": "0E:44:7B:CC:82:AE",
"port": 51400,
"pin": "340-42-632"
},
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"platform": "KlikAanKlikUit",
"driver": {
"type": "rpi",
"pin": 6
},
"accessories": [
{
"name": "Light Closet",
"type": "Outlet",
"dimmable": false,
"address": "0000e1",
"device": "2"
}
]
]
}
}

But I get an syntaxerror. I dont't see where the mistake is.

@robertklep
Copy link
Owner

{
  "bridge": {
    "name": "Homebridge 82AE",
    "username": "0E:44:7B:CC:82:AE",
    "port": 51400,
    "pin": "340-42-632"
  },
  "platforms": [
    {
      "name": "Config",
      "port": 8581,
      "platform": "config"
    },
    {
      "platform": "KlikAanKlikUit",
      "driver": {
        "type": "rpi",
        "pin": 6
      },
      "accessories": [
        {
          "name": "Light Closet",
          "type": "Outlet",
          "dimmable": false,
          "address": "0000e1",
          "device": "2"
        }
      ]
    }
  ]
}

@remko2000
Copy link
Author

thx, that do the job.

Homebridge GUI gives me now:

Error: Unable to load driver 'rpi': Pin 6 is not valid when using physical mapping
at new KaKuPlatform (/usr/local/lib/node_modules/homebridge-klikaanklikuit/index.js:26:13)
at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:337:32)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:90:36)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)

@remko2000
Copy link
Author

I change it to 8 and now I don't have errors anymore. I will test my transmitter now :-)

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

2 participants