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 JavaScript Unit Testing Introducing Unit Testing Red, Green, Refactor

Brian Patterson
Brian Patterson
19,588 Points

Cannot find module error.

When I type node textUtilities.js I get the following error.

js-unit-testing node textUtilities.js
module.js:557
    throw err;
    ^

Error: Cannot find module '/Users/briankaty1/Dropbox/JavaScript/1-introducing-unit-testing/js-unit-testing/textUtilities.js'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:190:16)
    at bootstrap_node.js:662:3

Any reason why this is?

1 Answer

Daan Schouten
Daan Schouten
14,454 Points

Are you sure you're in the right directory when executing node from you terminal window?