diff --git a/scripts/deploy-next-frontend-to-vmid5000.sh b/scripts/deploy-next-frontend-to-vmid5000.sh index 7124855..3d2abff 100755 --- a/scripts/deploy-next-frontend-to-vmid5000.sh +++ b/scripts/deploy-next-frontend-to-vmid5000.sh @@ -114,7 +114,9 @@ fi APP_RELATIVE_DIR="." APP_SERVER_PATH="${STANDALONE_ROOT}/server.js" if [[ ! -f "${APP_SERVER_PATH}" ]]; then - ALT_SERVER_PATH="$(find "${STANDALONE_ROOT}" -path '*/server.js' -print | head -n 1 || true)" + ALT_SERVER_PATH="$(find "${STANDALONE_ROOT}" \ + -path '*/node_modules' -prune -o \ + -path '*/server.js' -print | head -n 1 || true)" if [[ -n "${ALT_SERVER_PATH}" ]]; then APP_SERVER_PATH="${ALT_SERVER_PATH}" APP_RELATIVE_DIR="$(dirname "${ALT_SERVER_PATH#${STANDALONE_ROOT}/}")"