From 02ab13b9692a90b1ac45007904e2279384451f28 Mon Sep 17 00:00:00 2001 From: p1100i Date: Wed, 20 Nov 2024 03:15:17 +0100 Subject: [PATCH] entrypoint: ignore node warning about cjs require * node-v24 this might not be needed see https://github.com/nodejs/node/issues/55417 --- entrypoint.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5c5fd5d..4ca9d37 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -79,10 +79,18 @@ fi project_command="cd ${project_dir};" +# +# npm emits warning cauze it uses experimental nodejs feature +# see https://github.com/nodejs/node/issues/55417 +# +# With node-v24 this might not be needed +# +npm_command="NODE_OPTIONS=--disable-warning=ExperimentalWarning npm" + if [ -z "${SKIP_NPM_INSTALL:-}" ]; then - project_command="${project_command} npm install;" + project_command="${project_command} ${npm_command} install;" fi -project_command="${project_command} npm test;" +project_command="${project_command} ${npm_command} test;" su - "${project_user}" -c "${project_command}"