From 7c3f492ad0f9e6fb0df803c70da99534500685db Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 12 Sep 2019 11:31:42 +0200 Subject: [PATCH] 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. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 08059db..ecc861f 100644 --- a/Makefile +++ b/Makefile @@ -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