autogen: Check npm version

Make sure we have at least npm 3.  This will prevent others from wasting
time trying to chase down the dependencies problems reported by older
versions (such as the one found in Debian).

Closes #8987
This commit is contained in:
Allison Karlitskaya 2018-04-12 19:13:33 +02:00 committed by Martin Pitt
parent 9e398b658a
commit 0f5bfe32bb
1 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,12 @@ PKG_NAME="Cockpit"
olddir=$(pwd)
cd $srcdir
npm_version=$(npm --version)
if test ${npm_version%%.*} -lt 3; then
echo npm version greater than 3.0.0 required, but you have ${npm_version} installed
exit 1
fi
# Development dependencies: See node_modules/README
npm prune
npm install # see package.json