maddox / dasher

🔘 A simple way to bridge your Amazon Dash buttons to HTTP services
MIT License
711 stars 93 forks source link

script/find_button #56

Open dylanrmurphy opened 7 years ago

dylanrmurphy commented 7 years ago

when I run pi@raspberrypi:~/dasher $ script/find_button it gives me the error below. What am I doing wrong:

module.js:472
    throw err;
    ^

Error: Cannot find module '/home/pi/dasher/node_modules/node-dash-button/bin/findbutton'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)

This could be because when I run pi@raspberrypi:~/dasher $ npm install it comes up with:

Usage: npm <command>

where <command> is one of:
    access, adduser, bin, bugs, c, cache, completion, config,
    ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
    help, help-search, i, init, install, install-test, it, link,
    list, ln, login, logout, ls, outdated, owner, pack, ping,
    prefix, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, tst, un, uninstall,
    unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /home/pi/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@4.0.5 /usr/lib/node_modules/npm

Also how can I run this on a RPI 1 as I cannot install node.js v7?

``

Thanks

Ben3rot commented 7 years ago

For the "older" RPI is another Version of Node available. It should work with all ARMv6 RPI.

tar -xvf node-v6.9.4-linux-armv6l.tar.xz
cd node-v6.9.4-linux-armv6l

sudo cp -R * /usr/local/    

To check is node is working use node -v to see the installed version of node.

sixreeves commented 7 years ago

I'm having a similar issue on the older/original Pi. I updated to node v6.11.1 and npm install looked good with one warning:

(node:860) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

Here is the output for find_button:

`module.js:471 throw err; ^

Error: Cannot find module '/home/pi/dasher/node_modules/node-dash-button/bin/findbutton' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:504:3 `