rodro1

install node indipendently on cpanel ssh

Apr 10th, 2021 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. v14.16.1.tar.gz
  2.  
  3. sudo npm run build
  4.  
  5. check path of npm if you are using npm by
  6. which npm
  7.  
  8. https://unix.stackexchange.com/questions/444998/how-to-set-and-understand-fs-notify-max-user-watches
  9. https://mrzacsmith.medium.com/how-to-kill-nodejs-hanging-processes-simply-in-linux-6cde8e864cc4
  10.  
  11. https://peterthaleikis.com/posts/how-to-fix-throw-er-unhandled-error-event.html
  12.  
  13.  
  14. Core Dumped Fix:
  15. To list all Linux processes with some extra information about its origin, use this command:
  16. $ ps -ef -A
  17. Using Grep to List Node Processes
  18. You can also list Node processes only with a grep search:
  19. $ ps -ef | grep node
  20. This will show a list of running Node processes with their process ID pid. Let us assume that the pid is 1234, you would kill it with:
  21. $ kill 1234
  22. Stop All Node Processes
  23. In the event you want to kill all Node processes at once:
  24. $ pkill -f node
  25.  
  26.  
  27.  
  28. sudo apt --auto-remove purge npm // clear npm memory cache
  29. sudo apt --auto-remove purge nodejs // clear npm memory cache
  30.  
  31. killall node
  32.  
  33. 10.16.3
  34. chmod -R a+x node_modules // change permission 777
  35. rm -rf directory name
  36.  
  37. ou’ll need to login via SSH and then run the following commands from the home folder. (Change the version numbers in the commands below if you’d like to use a more recent version.)
  38.  
  39. # Make a new folder for node
  40. mkdir node
  41. cd node
  42.  
  43. # Download and unzip node
  44. curl -O https://nodejs.org/dist/v14.16.1/node-v14.16.1-linux-x64.tar.gz
  45. tar -xvzf node-v14.16.1-linux-x64.tar.gz --strip-components=1
  46. # Add node and npm it to PATH (and do so for future sessions too)
  47. export PATH=$HOME/node/bin:$PATH
  48. echo 'export PATH=$HOME/node/bin:$PATH' >> ~/.bashrc
  49.  
  50.  
  51. After that you should be able to run node and npm from any folder. Test it via:
  52. node -v
  53. npm -v
  54. I did find that on VentraIP I could not use Node to compile VuePress due to limits in the number of threads that each account can create. But other commands worked fine.
Add Comment
Please, Sign In to add comment