-
Notifications
You must be signed in to change notification settings - Fork 18
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
Error: Cannot find module 'nodegame-client': but where should I put the game file? #125
Comments
Hi,
Are you also setting the games directory to dev/games? You do not need a
symlink. If not, try it, you can check all the options inside the file
nodegame-server/conf/servernode.js
Let me know,
Stefano
Lieu Zheng Hong <notifications@github.com> schrieb am Do., 20. Feb. 2020,
14:43:
… Dear Stefano,
I've been trying to make the nodeGame setup more portable.
So I have my game in '/dev/communication-gameand I have a symlink in/dev/nodegame/nodegame-v5.8.1/games`
pointing to it.
The problem is that of course ~/dev/communication-game doesn't have any
of the node modules, because it's in a different folder than the one I
installed the nodegame versions. How should I resolve this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#125?email_source=notifications&email_token=AAHJM5H6NFSU6SBINMRRKU3RD2CGRA5CNFSM4KYPCGDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IO7WTGQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHJM5F6DIVYYRLFEAAZT3DRD2CGRANCNFSM4KYPCGDA>
.
|
Hi Stefano, Sorry, am not sure what you mean. What exactly do I set? |
If there is some documentation, I'd be happy to take a look and understand it. |
Sorry if my message was unclear before, I was typing from my phone. Here is some documentation: https://github.com/nodeGame/nodegame/wiki/Server-Configuration-v5 however, it is basically a pointer to the file I mentioned before. In your case, you should set the variable |
If it does not work, you could try to symlink the node_modules directory in /dev/ (should work, but ugly), or you could install the needed modules globally with npm. This latter solution is also not very elegant, because you will still have a local and and global copy of the nodegame modules. Let me know. |
So I've set
This did not work. Unless I should be editing the |
You should set servernode.gameDirs = ...
Am Do., 20. Feb. 2020 um 22:31 Uhr schrieb Lieu Zheng Hong <
notifications@github.com>:
… So I've set /home/lieu/dev/bee_game/nodegame-v5.8.1/conf/servernode.js to
the following:
/**
* # servernode.js
*
* Copyright(c) 2017 Stefano Balietti ***@***.***>
* MIT Licensed
*
* Configuration file for ServerNode in nodegame-server.
* ---
*/
module.exports = configure;
function configure(servernode) {
// Extra configuration goes here, e.g.:
// servernode.port = 80;
// servernode.homePage = false;
gameDirs = ['/home/lieu/dev/communication-game']
// See the full set of configuration options in:
// node_modules/nodegame-server/conf/servernode.js
return true;
}
This did not work. Unless I should be editing the servernode.js file in
the node_modules folder instead?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#125?email_source=notifications&email_token=AAHJM5C3TXLY2XCHGZT3TQ3RD3ZEVA5CNFSM4KYPCGDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMQHAXY#issuecomment-589328479>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHJM5EID5OCHQ6GNOWTTPTRD3ZEVANCNFSM4KYPCGDA>
.
|
Still doesn't work, unfortunately. Should I be editing the |
They file in conf has higher priority than that inside node_modules, so it
would have no effect. I think should try add a symlink in dev the
node_modules folder inside the nodegame directory.
Am Do., 20. Feb. 2020 um 22:43 Uhr schrieb Lieu Zheng Hong <
notifications@github.com>:
… function configure(servernode) {
// Extra configuration goes here, e.g.:
// servernode.port = 80;
// servernode.homePage = false;
servernode.gameDirs = ['/home/lieu/dev/communication-game']
// See the full set of configuration options in:
// node_modules/nodegame-server/conf/servernode.js
return true;
}
Still doesn't work, unfortunately. Should I be editing the servernode.js
file in the node_modules folder?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#125?email_source=notifications&email_token=AAHJM5DR6RRIR3MXGXEGNSTRD32R5A5CNFSM4KYPCGDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMQIJCI#issuecomment-589333641>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHJM5F3P4564NUQGGILR5TRD32R5ANCNFSM4KYPCGDA>
.
|
Sorry, I don't understand. From what directory do I add a symlink, and where do I symlink to? Should I create a symlink from |
Yes, you should have a node_modules symlink in the same directory of your
game or in the directory above, this is how Node looks up modules. Let me
know.
Am Do., 20. Feb. 2020 um 23:03 Uhr schrieb Lieu Zheng Hong <
notifications@github.com>:
… Sorry, I don't understand. From what directory do I add a symlink, and
where do I symlink to?
Should I create a symlink from /home/lieu/dev/communication-game pointing
to /home/lieu/dev/bee_game/nodegame-v5.8.1/node_modules?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#125?email_source=notifications&email_token=AAHJM5DD7AOUTGX4NIBC22DRD344ZA5CNFSM4KYPCGDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMQO4NI#issuecomment-589360693>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHJM5D5FH7TOMJJWJA2LXLRD344ZANCNFSM4KYPCGDA>
.
|
Ah, adding the symlink seems to work, thank you very much! |
Dear Stefano,
I've been trying to make the nodeGame setup more portable.
So I have my game in
~/dev/communication-game
and I have a symlink in~/dev/bee-game/nodegame-v5.8.1/games
pointing to it.The problem is that of course
~/dev/communication-game
doesn't have any of the node modules, because it's in a different folder than the one I installed the nodegame versions. Thus when I try to run, I get the following error:How should I resolve this?
The text was updated successfully, but these errors were encountered: