nebrius / raspi-io

An IO plugin for Johnny-Five that provides support for the Raspberry Pi
MIT License
546 stars 63 forks source link

Install script throws an error #97

Closed rbwilcoxon11 closed 7 years ago

rbwilcoxon11 commented 7 years ago

The install script seems to have a bug in it... I think it could be resolved if the right dependencies were installed.

Here's my package.json

{
  ...
  "dependencies": {
   ...
    "raspi-io": "^8.1.0"
  },
  ...

When I run

npm install

I get this error back

> raspi-soft-pwm@4.0.1 preinstall /home/pi/hue-ball/node_modules/raspi-soft-pwm
> sh ./script/pigpio.sh

pigpio is already installed, skipping installation
npm ERR! Cannot read property 'pause' of undefined

I had installed this package about a week ago with no problems, I think it was the recent update. I could try to pull all the old packages, but I think it'd be easier just to fix this one...

nebrius commented 7 years ago

Hi @rbwilcoxon11! I ran into this issue too and documented it over at https://github.com/nebrius/raspi-io/issues/96.

Can you let me know which version of Node.js and npm you're running?

rbwilcoxon11 commented 7 years ago

Node version - v8.5.0 npm version - 5.4.1

Right now i'm getting around it by installing all the dependencies manually and combining them like this packages src

image

The up-carrots are misleading though; each of those is the specific version I installed of each package

nebrius commented 7 years ago

Can you try downgrading to npm 5.3.0? That's what fixed it for me.

npm install -g npm@5.3.0

rbwilcoxon11 commented 7 years ago

Works 👍