Basic Node and Express - Use the .env File

Tell us what’s happening:
Attempting to do this locally, I have written the code as specified in the instructions however keep getting this error

Your code so far
Emitted ‘error’ event on Server instance at:
at emitErrorNT (net.js:1345:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -48,
syscall: ‘listen’,
address: ‘::’,
port: 3000
npm ERR! errno 1
npm ERR! fcc-learn-node-with-express@0.1.0 start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fcc-learn-node-with-express@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Basic Node and Express - Use the .env File

Link to the challenge:

hello and welcome to fcc forum :slight_smile:

  • port is already in used!!

happy coding :slight_smile:

The reason you are getting this error is due the port number 3000 is already in used.

  • You can use a different port and try again for e.g. 4000 or any other.
  • You can kill the previous process that is running on this port 3000.
    here’s the stackoverflow link to do so.

Thank you that was the issue it looks like.

Thank you, that was the issue.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.