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 committed by Martin Pitt
parent 0afad278eb
commit 0d636daa47

View file

@ -150,7 +150,8 @@ test/common:
$(NODE_MODULES_TEST): package.json $(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 # 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 rm -f package-lock.json
npm install # unset NODE_ENV, skips devDependencies otherwise
npm prune 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 .PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po