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

Various issues #2

Open
lobsterhands opened this issue Nov 21, 2014 · 5 comments
Open

Various issues #2

lobsterhands opened this issue Nov 21, 2014 · 5 comments

Comments

@lobsterhands
Copy link

When I first downloaded and tried to run $ node index.js, I got an error that express had deprecated res.sendfile. I updated server.js line 21 to read res.sendFile(...). Then I got an error pointing to client/dist/index.html, which didn't exist. I found index.html in client/production so on line 15 of server.js I pointed staticPath to client/production.

Now the game loads. It seems I have to refresh the page to get the game to actually load. Also, I'm having an issue getting 2 players in the game from different browsers on the same computer (though I can run multiple instances of the game).

@ymkim92
Copy link

ymkim92 commented Dec 27, 2014

I have the exactly same symptom. In addition, the spaceship does not follow the mouse point sometimes.

@timofeysie
Copy link

Running the node index.js (after doing a npm install on Mac OS 10.9.5) gave me the following error:

express deprecated res.sendfile: Use res.sendFile instead server/server.js:21:7
Error: ENOENT, stat '/Users/timothy/angular/ng-game/client/dist/index.html'

So I changed the f to an F on line 21 in server.js, and the next error is:

Error: ENOENT, stat '/Users/timothy/angular/ng-game/client/dist/index.html'

I followed lobsterhands suggestion regarding changing client/dist to client/production on line 15 (also in server.js) and the app runs without error. However, when starting a game, there is nothing but a black screen.

@jshemas
Copy link

jshemas commented Jan 16, 2015

What I had to do to get this to work is...

Note: If this doesn't work, start the client side first. This will build the files needed for the server side.

Server Side (starting in root):
npm install
node index.js

Client Side (starting in root):
cd client
npm install && bower install && gulp

@gabrielkunkel
Copy link

I followed jshemas instructions and now it loads, but the game window is black.

@farkerhaiku
Copy link

it loads, but it can't pull down the assets due to the code in ws.js just using the hostname and not the port. Change line 7 to

var myIoSocket = io.connect(window.location.hostname + ":8000");

and you'll be able to see the assets loading.

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

6 participants