1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-05 04:40:11 +01:00

[fix] nvm.install: add missing popd / node.env exit with error (254)

Issue::

    $ make clean node.env
    ...
    CLEAN     [NVM] drop .nvm/
    ...
    INFO:  install Node.js by NVM
    ...
    Now using node v16.13.0 (npm v8.1.0)
    ...
    INSTALL   searx/static/themes/oscar/package.json
    npm ERR! code ENOENT
    npm ERR! syscall open
        # Here now comes the issue, caused by the missing 'popd' ..
    npm ERR! path SearXNG/.nvm/searx/static/themes/oscar/package.json
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, open 'SearXNG/.nvm/searx/static/themes/oscar/package.json'
    ERROR: node.env exit with error (254)
    make: *** [Makefile:99: node.env] Error 254

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2021-11-20 12:55:15 +01:00
parent 1c8b731791
commit 3e2f3900b8

View File

@ -115,6 +115,7 @@ nvm.install() {
NVM_VERSION_TAG="$(git describe --abbrev=0 --tags --match "v[0-9]*" "${NVM_VERSION_TAG}")"
info_msg "checkout ${NVM_VERSION_TAG}"
git checkout "${NVM_VERSION_TAG}" 2>&1 | prefix_stdout " ${_Yellow}||${_creset} "
popd &> /dev/null
nvm.env
}
@ -133,7 +134,7 @@ nvm.clean() {
fi
}
nvm.status(){
nvm.status() {
if command -v node >/dev/null; then
info_msg "Node.js is installed at $(command -v node)"
info_msg "Node.js is version $(node --version)"
@ -157,7 +158,7 @@ nvm.status(){
fi
}
nvm.nodejs(){
nvm.nodejs() {
nvm install --lts
nvm.status
}