stjohnjohnson / mqtt-dasher

Notifies MQTT when an Amazon Dash button is pressed
https://www.npmjs.com/package/mqtt-dasher
40 stars 10 forks source link

Cant even install :( #8

Open WalterWampe opened 6 years ago

WalterWampe commented 6 years ago

Hey there, I cant wait to use your little helping script to integrate my dashbuttons - but I am unable to install it... I get the following error:

npm install -g mqtt-dasher npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t https://github.com/mranney/node_pcap.git npm ERR! npm ERR! fatal: Cannot change to '/root/.npm/..': Permission denied npm ERR! npm ERR! exited with error code: 128 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-01-24T20_26_51_552Z-debug.log

Can you help me please?

stjohnjohnson commented 6 years ago

Looks like you're installing globally. When you do that, please preface the command with sudo

WalterWampe commented 6 years ago

Thats the thing - that also wont work, and I'm not sure why.

$ sudo npm install -g mqtt-dasher [sudo] password for smartassi: npm ERR! code 1 npm ERR! Command failed: /usr/bin/git clone -q https://github.com/mranney/node_pcap.git /home/smartassi/.npm/_cacache/tmp/git-clone-458d803d npm ERR! /home/smartassi/.npm/_cacache/tmp/git-clone-458d803d/.git: Permission denied npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! /home/smartassi/.npm/_logs/2018-01-25T08_57_06_767Z-debug.log

Can this have to do something with a venv I have set up?

stjohnjohnson commented 6 years ago

I would do sudo -h Sounds like it can't write to ~/.npm