diff --git a/data/helpers.d/nodejs b/data/helpers.d/nodejs index 61e02c8ad..5cb5c4fae 100644 --- a/data/helpers.d/nodejs +++ b/data/helpers.d/nodejs @@ -125,7 +125,7 @@ ynh_install_nodejs () { test -x /usr/bin/npm && mv /usr/bin/npm /usr/bin/npm_n # If n is not previously setup, install it - if ! type n > /dev/null 2>&1 + if ! type $(n --version > /dev/null 2>&1) then ynh_install_n elif dpkg --compare-version "$($n_install_dir/bin/n --version | cut -d" " -f2)" lt "6.5.1"