Reputation: 4177
Having installed all the default versions from the Ubuntu 18.04 LTS repos:
nvm 0.35.0
node v10.16.3
npm 6.9.0
express 4.0.0
All the following commands (provided in the express starter tutorial and several StackOverflow questions and blogs)
express app --view=pug
express --view pug
express --pug
generate package.json
like so:
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "nodejs ./bin/www"
},
"dependencies": {
"express": "~4.0.0",
"static-favicon": "~1.0.0",
"morgan": "~1.0.0",
"cookie-parser": "~1.0.1",
"body-parser": "~1.0.0",
"debug": "~0.7.4",
"jade": "~1.3.0"
}
}
Running npm install
on that will, of course, produce depreciation warning for jade
and also report a critical vulnerability for [email protected]
.
Not a good start, huh?
Question: How to get a working and current kickstart with express-generator (or anyhow else)?
Upvotes: 3
Views: 1869
Reputation: 1
If you want to upgrade package.json dependencies to the latest version, follow these steps -
Upvotes: 0
Reputation: 71
npx express-generator
to get the latest version of express.npm install pug
npm install
againapp.set('view engine', 'jade');
to app.set('view engine', 'pug');
npm audit
to check for any vulnerabilities againUpvotes: 6