Hello,
I have been stepping through my javascript code that does not work and I end up in the file: bonescript.js, and more specifically in this function:
function require(file) { throw 'Please perform setTargetAddress on a valid target'; }
This happens when I try to call:
var b = require('bonescript');
To try to solve the problem I stepped through some examples and noticed I that code brought me to a completely different “bonescript.js” file.
Turns out there are three:
/usr/share/bone101/static/bonescript.js
/usr/share/beaglebone-getting-started/Docs/bonescript.js
/usr/lib/node_modules/bonescript/bonescript.js
Can someone shed some light on this?
Thanks,
John
Hello,
I have been stepping through my javascript code that does not work and I end
up in the file: bonescript.js, and more specifically in this function:
function require(file) {
throw 'Please perform setTargetAddress on a valid target';
}
This happens when I try to call:
var b = require('bonescript');
To try to solve the problem I stepped through some examples and noticed I
that code brought me to a completely different "bonescript.js" file.
Turns out there are three:
/usr/share/bone101/static/bonescript.js
That one is used to establish a connection with the board from a
remote web page. It is served up at
http://YOUR_BEAGLEBONE/static/bonescript.js
/usr/share/beaglebone-getting-started/Docs/bonescript.js
That has a somewhat similar purpose, but is used in the Getting
Started Guide served up on the FAT partition.
/usr/lib/node_modules/bonescript/bonescript.js
This is the one that performs the socket.io connection services and is
served up at http://YOUR_BEAGLEBONE/beaglebone.js by server.js.
Can someone shed some light on this?
The actual bonescript functions are defined in
/usr/lib/node_modules/bonescript/index.js