Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Creating Your Own Arbitrary Tasks

did anyone get the roll dice button to work?

i was hoping after i copied the files over and generated the app.js file the webpage would work. unfortunately i received these console errors:

app.js:1 Uncaught ReferenceError: Dice is not defined at app.js:1 at app.js:1 (anonymous) @ app.js:1 (anonymous) @ app.js:1 :64351/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)

if anyone got this app to work please let me know how, or any suggestions to get it working would be appreciated. id like to use it in a craps simulation.

Steven Parker
Steven Parker
230,274 Points

You can make a snapshot of your workspace and post the link to it here to allow your issue to be replicated and analyzed.

Matthew McQuain
Matthew McQuain
14,184 Points

I actually have the same problem. No answers yet as far as I can see.

edit: I figured it out...maybe. You might be opening the index.html located in the src/ folder. Try running the index.html that is in the build/ folder instead. Worked for me.

1 Answer

Hi Adam,

I actually got the same error when I ran 'node build/app.js' in the console. But then I just opened the preview by clicking the Preview button in the Workspaces and clicked on the first file on the page, i.e. 'build/' and there was the dice rolling for me when I clicked the button. Not sure if this is what you are asking about, just trying to be helpful :) We are all in this together after all :) Happy coding and debugging!