three files titled: bonescript.js

99 views
Skip to first unread message

John Kollman

unread,
Nov 26, 2013, 10:13:35 AM11/26/13
to beagl...@googlegroups.com
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



Jason Kridner

unread,
Nov 26, 2013, 3:36:42 PM11/26/13
to beagl...@googlegroups.com
On Tue, Nov 26, 2013 at 10:13 AM, John Kollman <johnkol...@gmail.com> wrote:
> 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

>
> Thanks,
> John
>
>
>
> --
> 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 beagleboard...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages