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

nodemon app crashed - waiting for file changes before starting...

Not sure why the module can't find './api'? Error below:

Error: Cannot find module './api' at Function.Module._resolveFilename (module.js:455:15) at Function.Module._load (module.js:403:25) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/kevinsmith/Desktop/mean-todo/src/app.js:4:14) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) [nodemon] app crashed - waiting for file changes before starting... [nodemon] restarting due to changes... [nodemon] starting node src/app.js module.js:457 throw err; ^

1 Answer

Seth Kroger
Seth Kroger
56,413 Points

Do you have either a file named src/api.js or src/api/index.js?