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

Development Tools Install and Use Sequelize CLI

josefina terrera
josefina terrera
16,506 Points

Error at npm start

I'm following this tutorial from my terminal, not workspaces. When I ran "npm start", I get an error: module.js:440 throw err; ^

Error: Cannot find module 'npmlog' at Function.Module._resolveFilename (module.js:438:15) at Function.Module._load (module.js:386:25) at Module.require (module.js:466:17) at require (internal/module.js:20:19) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:13 at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:76:3) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:456:32) at tryModuleLoad (module.js:415:12)

I'm updated my node version with brew. I'm not sure how to fix this. Thanks!

2 Answers

josefina terrera
josefina terrera
16,506 Points

I uninstalled and reinstalled node and after running it sudo, now I get this error:

blog@1.0.0 start /Users/joseterrera/Documents/development/projects2016/projects/sequelize_blog node ./bin/www

module.js:440 throw err; ^

Error: Cannot find module 'express' at Function.Module._resolveFilename (module.js:438:15) at Function.Module._load (module.js:386:25) at Module.require (module.js:466:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/joseterrera/Documents/development/projects2016/projects/sequelize_blog/app.js:1:77) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:456:32) at tryModuleLoad (module.js:415:12) at Function.Module._load (module.js:407:3)

npm ERR! Darwin 15.0.0 npm ERR! argv "/usr/local/Cellar/node/6.1.0/bin/node" "/usr/local/bin/npm" "start" npm ERR! node v6.1.0 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE npm ERR! blog@1.0.0 start: node ./bin/www npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the blog@1.0.0 start script 'node ./bin/www'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the blog package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./bin/www npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs blog npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls blog npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/joseterrera/Documents/development/projects2016/projects/sequelize_blog/npm-debug.log

Bruno Navarrete
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Bruno Navarrete
Full Stack JavaScript Techdegree Graduate 22,246 Points

The file structure changes when you download the project files. In the videos, Andrew Chalkley is working in what you'd see as your sequelize_blog folder, while the project files have subfolders to work in. Make sure you follow the initial steps anywhere you work.