Skip to content

find_button script error #1

Description

@noisufnoc

I'm running the container with the --privileged flag, and it seems to work as expected. However, when I try to use the find_button script to obtain the mac address for my new buttons it errors out with the following message:


root@f64f9077cd36:~/dasher/script# ./find_button
module.js:328
    throw err;
    ^

Error: Cannot find module '/root/dasher/script/node_modules/node-dash-button/bin/findbutton'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

It seems that the path in that script is absolute, and does not work with the /root/dasher working directory. Updating the script to read the following works from within the container:

#!/bin/sh

sudo node /root/dasher/node_modules/node-dash-button/bin/findbutton

A relative path could be used here as well, or running the node command directly as the script is just a wrapper

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions