node problem with Mint

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

node problem with Mint

Dave Stevens
I'm not sure if this is OT, if so please point me
to as better source.

I am trying to run a node.js module someone else developed. It is
intended to read from a little plantower dust sensor into a file.

The sensor is connected through a uart to a usb port.

I type "sudo ./getpmdatamod" and get an authentication request then a
sequence of these:

../getpmdatamod: line 14: /root/node_modules/plantower/bin.js: No such
file or directory


and as many more as you want, ctl-C stops it.

I am not running the command as root, only using sudo. Where is the
"/root" part coming from? Sure enough there isn't any "/node_modules" in
the /root folder but I'm not referencing it. Anyone know how this is
happening? or why?

Dave

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: node problem with Mint

Oliver Grawert
hi,
Am Freitag, den 04.12.2020, 17:55 -0800 schrieb Dave Stevens:
> I'm not sure if this is OT, if so please point me
> to as better source.
>
> I am trying to run a node.js module someone else developed. It is
> intended to read from a little plantower dust sensor into a file.
>
...
>
> I am not running the command as root, only using sudo.

why do you do that ? 

looking at https://github.com/perfectworks/node-plantower (which you
seem to be using)

nowehere in the instructions sudo is used, that might simply confuse
nodejs ... i'd just make sure your user is in the dialout group to
grant access to the serial port and try without sudo ...

ciao
        oli


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: node problem with Mint

Dave Stevens
On Sat, 05 Dec 2020 12:37:54 +0100
Oliver Grawert <[hidden email]> wrote:

> hi,
> Am Freitag, den 04.12.2020, 17:55 -0800 schrieb Dave Stevens:
> > I'm not sure if this is OT, if so please point me
> > to as better source.
> >
> > I am trying to run a node.js module someone else developed. It is
> > intended to read from a little plantower dust sensor into a file.
> >  
> ...
> >
> > I am not running the command as root, only using sudo.  
>
> why do you do that ? 

to get access to an i/o device, without sudo I get permission errors
>
> looking at https://github.com/perfectworks/node-plantower (which you
> seem to be using)

yes, correct
>
> nowehere in the instructions sudo is used, that might simply confuse
> nodejs ... i'd just make sure your user is in the dialout group to
> grant access to the serial port and try without sudo ...
>
> ciao
> oli

ok I can try that, thanks!

d
>


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: node problem with Mint

Dave Stevens
On Sat, 5 Dec 2020 10:49:12 -0800
Dave Stevens <[hidden email]> wrote:

 ok I can try that, thanks!
>
> d
> >  
>
>

That worked fine Oli, now on to other issues.

Thanks!

d

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users