Stuck on recreating modules when upgrading to Node.js 12.x

In 3:45 PM in PH Standard Time, I change the version of node (under engines) to 12.x in the package.json of the project commands-triggers-telegram but it takes too long. I switched back to 10.x, but still recreating modules for 12.x. Any suggestions on how to fix this?

If the project doesn’t change when you update package.json, it’s hung up on something. Go into the terminal in the container and run ps -aux. That will list all the processes running. You need to kill one of the non-root processes. Do so by running kill <pid>, where <pid> is the process ID (listed in the second or so column). The process you’re trying to kill is pnpm or npm (I believe)—or at least related to them or the start.js script.

It’s not a big deal if you kill something else because the environment is pretty adaptive and will restart whatever goes down if it’s related to what should be running.

EDIT: Update me on how things go. It might be worth posting what you killed in case other people stumble across the thread looking for a possible fix.

1 Like

Problem now solved by forking the app. This should be solved, however this suggestion maybe not yet tried. Thanks for that, @RA80533.

Forking the app was a good idea. Props.

Okay, @RA80533. I undid the project deletion, deleted the remixed app and jumped into the terminal. Which one of these processes should I kill?

app@commands-triggers-telegram: ~$: ps -aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  19716  2932 ?        Ss   06:14   0:00 bash /usr/bin/start-container
root         7  0.0  0.0   4392  1168 ?        S    06:14   0:00 runsvdir -P /etc/service
root         8  0.0  0.0   4240   656 ?        Ss   06:14   0:00 runsv wetty
root         9  0.0  0.0   4240   628 ?        Ss   06:14   0:00 runsv watcher
root        10  0.0  0.0    212     4 ?        S    06:14   0:00 /usr/bin/dumb-init /bin/bash ./run
root        11  0.0  0.0    212     4 ?        S    06:14   0:00 /usr/bin/dumb-init /bin/bash ./run
root        12  0.0  0.0  19700  2936 ?        Ss   06:14   0:00 /bin/bash ./run
root        13  0.0  0.0  19700  3020 ?        Ss   06:14   0:00 /bin/bash ./run
root        14  0.0  0.0   4504   728 ?        S    06:14   0:00 /bin/sh /opt/nvm/versions/node/v10/bin/wetty --port 1084 --command /etc/service/wetty/wetty-command.sh --base
root        15  0.0  0.9 991952 59804 ?        Sl   06:14   0:01 node build/source/index.js
root        27  0.0  0.7 845104 46572 ?        Rl   06:14   0:00 /opt/nvm/versions/node/v10/bin/node /opt/nvm/versions/node/v10/bin/../pnpm-global/1/node_modules/wetty.js/index.js --por
app         75  0.0  0.0    212     4 ?        Ss   08:49   0:00 /usr/bin/dumb-init /bin/bash /opt/watcher/app-types/node/install.sh
app         76  0.0  0.0  19776  3128 ?        Ss   08:49   0:00 /bin/bash /opt/watcher/app-types/node/install.sh
app        104  0.0  0.0  19716  3172 ?        S    08:49   0:00 bash /usr/bin/pnpm install
app        105  0.0  0.0  12944  1012 ?        S    08:49   0:00 grep --line-buffered -vF Installing a flat node_modules.
app        106  0.0  0.0  12944   928 ?        S    08:49   0:00 grep --line-buffered -vF A store server is running. All store manipulations are delegated to it.
app        107  0.0  0.0  12944  1004 ?        S    08:49   0:00 grep --line-buffered -vF Already up-to-date
root       112  0.0  0.6 862564 40420 ?        Sl   08:49   0:00 /opt/nvm/versions/node/v10.15.3/bin/node /opt/watcher/build/source/ot-storage.js /app
root       293  0.0  0.0  19716  3128 pts/1    Ss   08:50   0:00 /bin/bash /etc/service/wetty/wetty-command.sh
root       298  0.0  0.0  51004  3216 pts/1    S    08:50   0:00 su --preserve-environment --login app
app        299  0.0  0.0  19956  3580 pts/1    S    08:50   0:00 -su
app        406  0.0  0.0   6008   772 ?        S    08:51   0:00 sleep 0.5
app        407  0.0  0.0  36084  3044 pts/1    R+   08:51   0:00 ps -aux

Wait, did deleting and undeleting the project fix it?

Nope, deleting and undeleting doesn’t works. I killed it and it works, but the issue is when I trigger refresh command.

Okay. The problem is now solved after killing processes for pnpm install and /bin/bash /opt/watcher/app-types/node/install.sh. Case closed, period.

Had to try and find the thread where I encountered a similar issue. I’m glad you were able to solve it by killing those processes.

1 Like