I am following a tutorial in here for Node.js + Express - Tutorial - Setup of Express.
when I am following below codes :
npm install -g express-generator
then
express testjsexpress
then change directory & install dependencies:
npm install
and finally, run the application by
npm start
Then after calling the localhost:3000 I observe that there are some command in output. can you explain to me why these errors are happending? I want to know what I missed and how to solve it. I mean why I am receiving 200 in front of GET /stylesheets/style.css or 404 in front of GET /robots.txt or GET /favicon.ico
> [email protected] start x:\Projects\sccjsexpress
> node ./bin/www
GET / 200 482.237 ms - 170
GET /robots.txt 404 526.164 ms - 1362
GET /stylesheets/style.css 200 10.400 ms - 111
GET /favicon.ico 404 31.243 ms - 1362
GET / 304 14.910 ms - -
In my output I have below output:
Missing helper: "Welcome"
I tried the same steps as you were doing and it works perfectly fine. I guess you have issues with your node version.
check your current node version with the command:
sudo node -v
If you are below v8.X
then you need to upgrade node version. I am working with node v10.8.0
You can upgrade manage various node version with nvm (node version manager)
To install nvm you can follow the link here. and follow steps :
Install the version of Node.js you want
Install the latest version with nvm install node
Use the latest version with nvm use node
Install the latest LTS version with nvm install --lts
Use the latest LTS version with nvm use --lts