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

file missing repl #194

Closed
godpow opened this issue Sep 11, 2021 · 16 comments
Closed

file missing repl #194

godpow opened this issue Sep 11, 2021 · 16 comments
Assignees
Labels
question Further information is requested

Comments

@godpow
Copy link

godpow commented Sep 11, 2021

C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown>node pokemon-showdown start --no-security
RESTORE CHATROOM: lobby
RESTORE CHATROOM: staff

CRASH: Error: ENOENT: no such file or directory, scandir 'C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown\logs\repl'
at Object.readdirSync (fs.js:1043:3)
at _class.start (C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown\lib\repl.ts:12:16)
at Object. (C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown\server\index.ts:173:11)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Module.m._compile (C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown\node_modules\ts-node\src\index.ts:1310:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Object.require.extensions. [as .ts] (C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown\node_modules\ts-node\src\index.ts:1313:12)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Object. (C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown\pokemon-showdown:134:22)

SUBCRASH: Error: ENOENT: no such file or directory, open 'C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown\logs\errors.txt'

Worker 1 now listening on 0.0.0.0:8000
Test your server at http://localhost:8000
image

@godpow
Copy link
Author

godpow commented Sep 12, 2021

Am I missing a step or something?

@hsahovic
Copy link
Owner

hsahovic commented Sep 12, 2021

Hey @godpow,

Thanks for reaching out. This seems to be a pokemon-showdown issue - if you do not find a fix, I would recommend reaching out to them.
I am not sure what is causing this error, but other people with similar error messages like here or here got results by rebuilding the faulty library. Maybe something like npm build or npd rebuild . could help?

@hsahovic hsahovic added the question Further information is requested label Sep 12, 2021
@hsahovic hsahovic self-assigned this Sep 12, 2021
@hsahovic
Copy link
Owner

One other thing that may be helpful: it looks like you are using windows. I would recommend taking a look at WLS, as it gives you access to a linux terminal directly from your windows environment, which makes working with libraries like pokemon-showdown a lot easier.

@godpow
Copy link
Author

godpow commented Sep 13, 2021

I installed ubuntu on a spare hard drive seems like the same issue
linux.txt
Screenshot from 2021-09-12 22-59-13

@godpow
Copy link
Author

godpow commented Sep 13, 2021

I can get on showdown just fine in a browser.

@hsahovic
Copy link
Owner

Which version of node are you using?

@godpow
Copy link
Author

godpow commented Sep 13, 2021

On windows and linux node 14

@hsahovic
Copy link
Owner

Can you try upgrading to node 15?

@godpow
Copy link
Author

godpow commented Sep 13, 2021

I didn't see node 15 for windows so I upgraded to 16 still same issue on windows. I'll try it on linux in a while

@hsahovic
Copy link
Owner

@godpow I tried running my ci scripts and encountered the same issue - I think there is something broken in PS's current main branch, or they recently changed something that broke the installation steps I'm using.
I'll open an issue in their repo. Feel free to chime in :)

@godpow
Copy link
Author

godpow commented Sep 14, 2021

Ok hopefully it'll be fixed soon!

@godpow
Copy link
Author

godpow commented Sep 14, 2021

C:\Users\CyberKira\Documents\pokemon showdown\pokemon-showdown>node pokemon-showdown start --no-security
RESTORE CHATROOM: lobby
RESTORE CHATROOM: staff
Worker 1 now listening on 0.0.0.0:8000
Test your server at http://localhost:8000

it seems like making all of the directories fixed the issue. I have another question though how do you connect the bot to showdown and not a local server?

@godpow
Copy link
Author

godpow commented Sep 14, 2021

image

@hsahovic
Copy link
Owner

Good job! Thanks again for bringing up this issue, it was a good catch.
Regarding connecting to showdown, I think you should find what you need here. Let me know if something isn't clear!

@godpow
Copy link
Author

godpow commented Sep 14, 2021

I have both pokemon-showdown and poke-env but I'm a bit confused on where to go from here. I looked in the server configuration and replaced the localhost:8080 with https://play.pokemonshowdown.com/action.php?. Not sure what to do to be honest.

@hsahovic
Copy link
Owner

When instantiating a Player object, pass server_configuration=ShowdownServerConfiguration and player_configuration=PlayerConfiguration("showdown_username", "showdown_password") - this will make it connect to showdown's server with the given username / password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants