node.jslinuxnpmdebian-based

NodeJS Segmentation fault while starting server,js


I made a change to my server.js file today and pushed it to GitHub and then synchronized it on my server with "git stash --all" and "gh repo sync". Because I also had changes locally in the server.js file, I couldn't pop the stashes, but I ignored that and simply downloaded the packages themselves again and then set the .env file again. However, I then had problems when starting or installing the node modules. I don't remember exactly and I can't scroll anymore because the terminal no longer allowed it. Well, after trying around many times, I deleted nodejs and npm from my Linux system and removed everything with “sudo apt autoremove”. After I installed nodejs again with "sudo apt install nodejs", I noticed that nodejs version 12 was installed, which was strange because I had already added the NodeJS apt source. However, I didn't think much of it and just ran the apt source commands and then installed nodejs and npm, which also worked. However, now I have the following problems.

As soon as I enter "node server.js" it loads for a very long time and then I get the message "segmentation fault" error back. The strange thing is node -v etc. Works. Only "node server.js" doesn't work. I have already rebooted, checked the version, checked the rights, different file locations and much more.


Solution

  • The issue was that I had to install the PostgreSQL Client. After I installed it the issue was fixed.