Giter Club home page Giter Club logo

Comments (19)

huytd avatar huytd commented on July 18, 2024
-bash: /usr/sbin/node: No such file or directory

May be it was a problem with your nodejs installation

Could you run this command?

node -v

from agar.io-clone.

huytd avatar huytd commented on July 18, 2024

OK. Found the problem.
It's not node problem, but there is a new Config file (config.yml)
I fixed it in the latest commit

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

Should I clone again?

from agar.io-clone.

 avatar commented on July 18, 2024

@Nezcafe clone, please

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

I get an error again;

root@xxx:~/agar.io-clone# node server/server.js

module.js:340
throw err;

Error: Cannot find module 'js-yaml'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/root/agar.io-clone/server/server.js:7:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

from agar.io-clone.

jniles avatar jniles commented on July 18, 2024

That's good, you are almost there. Rerun npm install and it should work.

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

Doesnt figure out. I get still an error.

from agar.io-clone.

 avatar commented on July 18, 2024

post the error here

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

root@xxx:~/agar.io-clone# node server/server.js

module.js:340
throw err;
^
Error: Cannot find module 'js-yaml'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/root/agar.io-clone/server/server.js:7:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

from agar.io-clone.

 avatar commented on July 18, 2024

try this command:

npm install js-yaml

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

root@xxx:~/agar.io-clone# node server/server.js
Config file not found!

from agar.io-clone.

 avatar commented on July 18, 2024

omg, create a new file in server folder called config.yml

and paste in config.yml:

port: 3000
maxSizeMass: 50
maxMoveSpeed: 10
massDecreaseRatio: 1000
foodMass: 1
newFoodPerPlayer: 30
respawnFoodPerPlayer: 1
foodRandomWidth: 500
foodRandomHeight: 500
maxFoodCount: 50
noPlayer: 0
defaultPlayerSize: 10
eatableMassDistance: 5

save and start server

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

I got it, but again error.

root@xxx:~/agar.io-clone/server# npm start

[email protected] start /root/agar.io-clone
node server/server.js

listening on *:undefined

from agar.io-clone.

 avatar commented on July 18, 2024

delete and download this:
https://github.com/Ariamiro/agar.io-clone.git

use command:

npm install

after, open the server

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

I did these;

root@xxx:# rm -rf agar.io-clone/
root@xxx:
# git clone https://github.com/Ariamiro/agar.io-clone.git
Cloning into 'agar.io-clone'...
remote: Counting objects: 566, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 566 (delta 6), reused 0 (delta 0), pack-reused 541
Receiving objects: 100% (566/566), 105.07 KiB | 0 bytes/s, done.
Resolving deltas: 100% (278/278), done.
Checking connectivity... done.

Then;
root@xxx:~# npm install
npm ERR! install Couldn't read dependencies
npm ERR! Linux 3.13.0-27-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.25
npm ERR! npm v2.11.0
npm ERR! path /root/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34

npm ERR! package.json ENOENT, open '/root/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log

from agar.io-clone.

 avatar commented on July 18, 2024

the npm can't find a package.json, are you in the right folder?

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

Yes, I installed now. But start server isnt working.

root@xxx:~/agar.io-clone# npm start

[email protected] start /root/agar.io-clone
node server/server.js

fs.js:432
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory 'config/config.yml'
at Object.fs.openSync (fs.js:432:18)
at Object.fs.readFileSync (fs.js:286:15)
at Object. (/root/agar.io-clone/server/server.js:12:31)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

npm ERR! Linux 3.13.0-27-generic
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.10.25
npm ERR! npm v2.11.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node server/server.js
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server/server.js'.
npm ERR! This is most likely a problem with the agar-clone package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server/server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls agar-clone
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/agar.io-clone/npm-debug.log

from agar.io-clone.

 avatar commented on July 18, 2024

go to server and rename config.dist.yml to config.yml

from agar.io-clone.

sinankose avatar sinankose commented on July 18, 2024

I did it, but again error :(

root@xxx:~/agar.io-clone# node server/server.js

fs.js:432
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory 'config/config.yml'
at Object.fs.openSync (fs.js:432:18)
at Object.fs.readFileSync (fs.js:286:15)
at Object. (/root/agar.io-clone/server/server.js:12:31)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

from agar.io-clone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.