Scenario/Setup:
- MacOS High Sierra 10.13.6 with new install of VSCode 1.50.0
- Following/running VSCode Node Tutorial from: https://code.visualstudio.com/docs/nodejs/nodejs-tutorial
- Jump to "Express Application" section
- install Express as directed using
npm install -g express-generator
- build app as directed using
express myExpressApp --view pug
- run app using
npm start
but app / web server fails to run with error in terminal
Error:
Error: No default engine was specified and no extension was provided.
System Details:
Best Answer
Seems that pug view rendering engine NOT INSTALLED locally as a depency, even though I installed Express globally with
npm install -g express-generator
Fix
CTRL-`
(backtick) from inside of Visual Studio Codecd
into your project directory/folder - or already there if launched the terminal from VSCode (previous step)... from there run these commands:npm install pug
npm install express
npm install
npm start