Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
216,057 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,183 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!