Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start server on CentOS7 #31

Closed
xomikronx opened this issue Aug 17, 2016 · 5 comments
Closed

Unable to start server on CentOS7 #31

xomikronx opened this issue Aug 17, 2016 · 5 comments

Comments

@xomikronx
Copy link

Unable to start server. It's looking for node_modules/babel-node/package.json which doesn't exist.

`> POGOServer@0.2.7 start /var/www/MYDOMAIN/POGOserver

nodemon --exec npm run babel-node -- ./src/index.js

[nodemon] 1.10.0
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting npm run babel-node ./src/index.js
npm ERR! Error: ENOENT, open '/var/www/MYDOMAIN/POGOserver/node_modules/babel-node/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com

npm ERR! System Linux 3.10.0-327.28.2.el7.x86_64
npm ERR! command "node" "/bin/npm" "run" "babel-node" "./src/index.js"
npm ERR! cwd /var/www/MYDOMAIN/POGOserver
npm ERR! node -v v0.10.42
npm ERR! npm -v 1.3.6
npm ERR! path /var/www/MYDOMAIN/POGOserver/node_modules/babel-node/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/MYDOMAIN/POGOserver/npm-debug.log
npm ERR! not ok code 0
[nodemon] app crashed - waiting for file changes before starting...`

@maierfelix
Copy link
Owner

Seems like not a pogoserver related issue

@xomikronx
Copy link
Author

xomikronx commented Aug 17, 2016

@maierfelix any suggestions?

So I am able to install node-babel, I'm not an expert, but I don't know if it's the same package just named differently because of distro. I tried symlinking it to babel-node, which removes the error, but just hangs like this:

`> POGOServer@0.2.7 start /var/www/MyDOMAIN/POGOserver

nodemon --exec npm run babel-node -- ./src/index.js

[nodemon] 1.10.0
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting npm run babel-node ./src/index.js
[nodemon] clean exit - waiting for changes before restart`

@durankeeley
Copy link

durankeeley commented Aug 18, 2016

Here is a step by step CentOS-7 Install guide

1st Install dependencies and update

sudo vim /etc/yum.repos.d/mongodb.repo

you can also use nano if you prefer over vim of course using:

sudo yum -y install nano
sudo nano /etc/yum.repos.d/mongodb.repo

paste the below
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

sudo yum -y update
sudo yum -y install epel-release
sudo yum -y install git nodejs npm mongodb-org mongodb-org-server wget

2nd Update Node & npm

wget https://github.com/taaem/nodejs-linux-installer/releases/download/v0.3/node-install.sh && sudo sh node-install.sh

Reboot to apply new NodeJS version

sudo reboot
curl -L https://www.npmjs.com/install.sh | sudo sh

3rd Download & install POGOserver & start MongoDB

sudo systemctl start mongod
git clone https://github.com/maierfelix/POGOserver.git
cd POGOserver
sh run-linux.sh

NOTE

The problem you are having is you are using the epel versions of NodeJS & npm which are out of date.
You could most likely start from 2 and it would work but best to have the full instructions up here for anyone else. If you don't redownload the git remember to run

rm -rf node_modules && npm install

as the node_modules will be for the out of date version.

@xomikronx
Copy link
Author

xomikronx commented Aug 18, 2016

For some reason the steps provided isn't installing the latest node version. Installed nodejs manually from node repos and it worked. Thanks!

@durankeeley
Copy link

durankeeley commented Aug 18, 2016

@xomikronx you are right, just tested this on a fresh VM, if you run the steps in sequence then it doesn't work, however rebooting after running the update for NodeJS works. Updated the above to reflect this.

@Cronick Cronick closed this as completed Sep 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants