Error: Cannot find module 'bonescript'

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
icanfixthat
 
Posts: 2
Joined: Fri Jun 29, 2012 2:33 pm

Error: Cannot find module 'bonescript'

Post by icanfixthat »

I am trying to run blinkled.js this is what I get -

module.js:337
throw new Error("Cannot find module '" + request + "'");

^
Error: Cannot find module 'bonescript'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at Object.<anonymous> (/var/lib/cloud9/blinkled.js:1:72)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Array.0 (module.js:484:10)

Any ideas what is going on here? Thank you.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Error: Cannot find module 'bonescript'

Post by adafruit »

please check the beaglebone support google group - bonescript is still in ultra-alpha and may not work yet!

User avatar
icanfixthat
 
Posts: 2
Joined: Fri Jun 29, 2012 2:33 pm

Re: Error: Cannot find module 'bonescript'

Post by icanfixthat »

I searched everywhere. I just got it, and the code I'm loading is the test code to blink the LED. I noticed that my 'bonescript' folder was empty! I flashed the image from a download and it is working now.

User avatar
evolvingtech
 
Posts: 2
Joined: Thu Dec 15, 2011 11:52 pm

Re: Error: Cannot find module 'bonescript'

Post by evolvingtech »

I have the exact same problem. The Cloud9 IDE and Node.JS work fine, but the content for the bonescript Module is completely absent from the distribution.

Can anyone provide instructions on either:

1. Provide a link to a working Angstrom distribution that has the complete bonescript modules and examples properly populated (with instructions on how to transfer it to the SD card).

or

2. Provide instructions on how to get the github code moved over to the beaglebone.

User avatar
evolvingtech
 
Posts: 2
Joined: Thu Dec 15, 2011 11:52 pm

Re: Error: Cannot find module 'bonescript'

Post by evolvingtech »

I'm replying to my prior post, as I have found some information which may be useful to others who have encountered the same kind of problem...

If you have the beaglebone, can connect to it and run the Cloud9 IDE on:

http://192.168.7.2:3000

but the necessary bonescript code is an empty folder in the project files, you will likely need to get an updated image of the Angstrom distribution. I found the beaglebone "Demo" files can be located at:

http://www.angstrom-distribution.org/demo/beaglebone/

Since you already have the micro sd card already populated with all the requisite files, you only need to upgrade the image file. In my case, the updated image file is:

Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.06.18.img.xz

which is about a 400MB file.

I located an article on the web which shows how load the updated image onto the sd card when using OS X. The link for this article is:

http://www.nunoalves.com/open_source/?p=90

A few of comments...

* If you are like me, you might want to back up you sd card in its entirety just in case things get screwed up. To create a DMG file the following article is useful: http://www.wikihow.com/Make-a-DMG-File-on-a-Mac [/list]

* You will need to install a decompression utility called xz. This is a quick command (as described in the article on loading the updated beaglebone image file) if you already have brew installed on your OS. I am running Lion Server, so these things are already in place for me.

* When following the instructions in the article on installing the updated image pay careful attention to filenames. In the article's instruction the commands with devices like '/dev/disk1'. The devices on your install may be different (for instance, in my case the proper device was '/dev/disk3'). Examine carefully before issuing commands and apply some thoughtful common sense.

* One thing the article didn't mention, which I thought would be needed, and actually a comment was posted about the article, was to properly eject the device when done. (using:

diskutil eject <the name of your device>

in my case the command was:

diskutil eject /dev/disk3

In any case, I was able to fix the problem. Now I can run the bonescript examples in the Cloud9 IDE on the beaglebone (though the Cloud9 IDE is a bit flaky).

I hope this information is helpful for those of you who need to get the unbroken Angstrom distribution, or at a later date need an updated image.

AsH83
 
Posts: 14
Joined: Thu Jul 12, 2012 5:47 pm

Re: Error: Cannot find module 'bonescript'

Post by AsH83 »

I had the same issue when I used the image that was installed when the board was shipped to me..

When i re downloaded the same 6-18-12 image from BB website and used Win32DiskImager to recreate the image into the microSD card, the error went away and I was able to run all the Cloud9 test apps.

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”