Closed Tdwyd1 closed 4 years ago
Your Node Version is the issue here. You need to update to at least 8.6.0. I would recommend updating to the latest version though
That solution worked thank you!
Repeat: curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
then sudo apt-get install -y nodejs
Site startup
Site will not come online
Setup site following steps here https://steamapis.com/projects/node-csgo-web-tradebot/
Other
node --version
v6.17.1
Error Stack
First, when doing console-setup for
sudo systemctl stop apache2
andsudo systemctl stop nginx
I am getting the errorFailed to stop apache2.service: Unit apache2.service not loaded.
andFailed to stop nginx.service: Unit nginx.service not loaded.
respectively.I also needed to use an older version of pm2 since when doing
npm i -g pm2
and thenpm2 start index.js -n "Tradebot"
console just says[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
and it will not start. Currently usingnpm install pm2@2.10.1 -g
.Ignoring the 'stop' errors, and using the older version on pm2. When I try to do
pm2 start index.js
status shows as 'online', then when checking the logspm2 logs 0
0|index | /root/tradebot/node_modules/ws/lib/websocket.js:347 0|index | ...options 0|index | ^^^ 0|index | 0|index | SyntaxError: Unexpected token ... 0|index | at createScript (vm.js:56:10) 0|index | at Object.runInThisContext (vm.js:97:10) 0|index | at Module._compile (module.js:549:28) 0|index | at Object.Module._extensions..js (module.js:586:10) 0|index | at Module.load (module.js:494:32) 0|index | at tryModuleLoad (module.js:453:12) 0|index | at Function.Module._load (module.js:445:3) 0|index | at Module.require (module.js:504:17) 0|index | at require (internal/module.js:20:19) 0|index | at Object. (/root/tradebot/node_modules/ws/index.js:3:19)
Thanks for any help or suggestions!