Unable to run the server
Hello everyone,
I was having trouble running the server, but I managed to find a solution. Here's a step-by-step guide to help others who might be facing the same issue, this was tested on Ubuntu 22.
Change whatsapp-web.js Version in package.json:
- Change the line in the
package.jsonfile from:
to:"whatsapp-web.js": "1.23.1-alpha.5""whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#webpack-exodus" - Remove the
package-lock.jsonfile from the project.
Install Node.js 20.x LTS:
- Update and upgrade the system
- Remove previous versions of Node.js and npm
- Use the script provided by NodeSource to add the Node.js 20.x LTS repository to your system:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - - Install Node.js 20.x LTS:
sudo apt install nodejs -y
Install Forever and Start the Server:
- Create a
.envfile to store environment variables necessary for server configuration. - Install the
foreverpackage globally:npm install -g forever - Start the server using
foreverto ensure it continues running even after the terminal is closed:forever start server.js
Hi,
So when I try forever start server.js, I receive this error:
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1163) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(node:1163) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency```
The error is gone but session is not getting connected
Hi,
So when I try
forever start server.js, I receive this error:(Use `node --trace-warnings ...` to show where the warning was created) (node:1163) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (node:1163) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency```
This is just a warning. Type forever list to list yours running servers, forever logs 0 to show the logs of the first server.
Please use the latest docker version 🙏