Hello Sir,

I tried this out. I used that BASH command and it did not locate my 
node_modules under /usr/local/lib for some reason. I have the 2 GB version: 
Linux beaglebone 4.9.37-ti-r47 #1 SMP PREEMPT Thu Jul 13 22:48:49 UTC 2017 
armv7l GNU/Linux. Should I update to the latest release of Stretch?

Seth

P.S. I do not even have node on my system right now for some reason. Oh and 
I do not have bonescript located anywhere on my machine either. This is the 
issue since I am using an invocation of 'bonescript' via *var b = 
require('bonescript'); *in a .js file.


On Sunday, August 13, 2017 at 1:03:04 PM UTC-5, RobertCNelson wrote:
>
> On Sun, Aug 13, 2017 at 12:54 PM, Mala Dies <[email protected] 
> <javascript:>> wrote: 
> > Hello, 
> > 
> > Here is the error message when I use sudo node tryTemp.js to run the .js 
> > file on my BBB in PuTTY. 
> > 
> > module.js:491 
> >     throw err; 
> >     ^ 
> > 
> > Error: Cannot find module 'bonescript' 
> >     at Function.Module._resolveFilename (module.js:489:15) 
> >     at Function.Module._load (module.js:439:25) 
> >     at Module.require (module.js:517:17) 
> >     at require (internal/module.js:11:18) 
> >     at Object.<anonymous> (/home/debian/tryTemp.js:1:71) 
> >     at Module._compile (module.js:573:30) 
> >     at Object.Module._extensions..js (module.js:584:10) 
> >     at Module.load (module.js:507:32) 
> >     at tryModuleLoad (module.js:470:12) 
> >     at Function.Module._load (module.js:462:3) 
> > 
> > Oh and sir, the software I am using to invoke 'bonescript' is: 
> > 
> > var b = require('bonescript'); 
> > 
> > function readTemp() { 
> >     b.analogRead('P9_40', displayTemp); 
> > } 
> > 
> > function displayTemp(reading) { 
> >     var millivolts = reading.value * 1800; 
> >     var Celsius = (millivolts - 500) / 10; 
> >     var Fahrenheit = (Celsius * 9/5) + 32 
> >     console.log("Celsius=" + Celsius + "/tFahrenheit=" + Fahrenheit; 
> > } 
> > 
> > setInterval(readTemp, 8000); 
>
> export NODE_PATH=/usr/local/lib/node_modules 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/43b2528b-8d98-4b44-b2d5-4dd23dab5530%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to