Fix building under NODE_ENV=production

This is meant to only control webpack. But `npm install` skips
installing `devDependencies` under `NODE_ENV=production`, which breaks
the package build. So always unset it for npm.

This fixes `NODE_ENV=production make` in a clean tree.
This commit is contained in:
Martin Pitt 2019-09-12 11:31:42 +02:00
parent b6947a3355
commit 7c3f492ad0

View file

@ -150,7 +150,8 @@ test/common:
$(NODE_MODULES_TEST): package.json
# if it exists already, npm install won't update it; force that so that we always get up-to-date packages
rm -f package-lock.json
npm install
npm prune
# unset NODE_ENV, skips devDependencies otherwise
env -u NODE_ENV npm install
env -u NODE_ENV npm prune
.PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po