Full stack MERN tutorial problem

Given that Cloud9 is not free and I needed a full stack tutorial that uses the free mlab database so…

Anyone else had any success with this full stack MERN tutorial? I am led to believe that once I setup the Mongoose connection and built the API I would be able to post user comments to my mlab DB. Except no data is pulling through and I get events exception errors when running the npm run start-dev script explained in the tutorial.

[Source: https://medium.com/@bryantheastronaut/react-getting-started-the-mern-stack-tutorial-feat-es6-de1a2886be50]

Care to share those errors?

Sure here we is console output :

$ npm run dev

> mern@0.1.0 dev /Users/jamespickering/Sites/mern
> nf start -p 3002

[WARN] No ENV file found
18:39:17 api.1   |  [nodemon] 1.17.2
18:39:17 api.1   |  [nodemon] to restart at any time, enter `rs`
18:39:17 api.1   |  [nodemon] watching: *.*
18:39:17 api.1   |  [nodemon] starting `node server.js`
18:39:17 api.1   |  events.js:182
18:39:17 api.1   |        throw er; // Unhandled 'error' event
18:39:17 api.1   |        ^
18:39:17 api.1   |  Error: listen EADDRINUSE :::3001
18:39:17 api.1   |      at Object._errnoException (util.js:1019:11)
18:39:17 api.1   |      at _exceptionWithHostPort (util.js:1041:20)
18:39:17 api.1   |      at Server.setupListenHandle [as _listen2] (net.js:1344:14)
18:39:17 api.1   |      at listenInCluster (net.js:1385:12)
18:39:17 api.1   |      at Server.listen (net.js:1469:7)
18:39:17 api.1   |      at Function.listen (/Users/jamespickering/Sites/mern/node_modules/express/lib/application.js:618:24)
18:39:17 api.1   |      at Object.<anonymous> (/Users/jamespickering/Sites/mern/server.js:80:5)
18:39:17 api.1   |      at Module._compile (module.js:624:30)
18:39:17 api.1   |      at Object.Module._extensions..js (module.js:635:10)
18:39:17 api.1   |      at Module.load (module.js:545:32)
18:39:17 api.1   |      at tryModuleLoad (module.js:508:12)
18:39:17 api.1   |      at Function.Module._load (module.js:500:3)
18:39:17 api.1   |      at Function.Module.runMain (module.js:665:10)
18:39:17 api.1   |      at startup (bootstrap_node.js:187:16)
18:39:17 api.1   |      at bootstrap_node.js:607:3
18:39:17 api.1   |  [nodemon] app crashed - waiting for file changes before starting...

Does this help?

I don’t understand what the Stack overflow thread is talking about or how it solves my issue.

I saw this error yesterday on a side issue. This means you are trying to run the server twice on the same web address/port. Stop the existing server first.

Restarting MacOS solved the kill process issue but not my main problem of no data pulling through from mlab.

I’ve not had any problems connecting to mlab. Can you give more detail?
I don’t really want to wade through that tutorial.
I would compare your code to the GitHub repo. I did not see a link to it but another user has done it: https://github.com/lpstandard/comment_box/

Thanks I took a look at that github repo. I missed some further code amends the blogger added after he explains how to get some results into Postman.

1 Like