First, save the code by pressing Ctrl + S.
Before running, ensure that Node.js is installed correctly by typing node -v
in your terminal. If it returns a version number, Node is installed properly.
After that, save your work and run the code using the command node app.js
, and that should resolve your issue.