After uninstalling the native versions of nodejs and npm from debian 10, I installed nodejs 16.14.0 thus: cd ~ curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt-get install -y nodejs From the project directory I initialized the project and installed express.js and pug using a special option to avoid a stupid error: npm init npm install express --no-bin-links npm install pug --no-bin-links