Closed SimonW68 closed 4 months ago
Terminating the program with Ctrl + C works for me on Windows 10. If you're asked "Terminate batch job (Y/N)?" you can hit Ctrl + C again.
After that npx scrabble-solver@latest
works without any issues for me.
@SimonW68 How are you running the project?
So I used Ctrl-A to interrupt.
Interesting - on my machine Ctrl + A is for "select all".
But after it becomes impossible to re-run the game.
If your system is in that state rebooting should help. Otherwise you can kill the corresponding node.js process.
Sorry I was confusing Ctrl + A and Ctrl + C. I am also using Ctrl + C and that's where I have the issue. I am running the project with
npx scrabble-solver
for some reason the @latest triggers the followin error:
C:\Users\Simon Wintz\scrabble-solver>npx scrabble-solver@latest npm error code ENOENT npm error syscall lstat npm error path C:\Users\Simon Wintz\AppData\Roaming\npm npm error errno -4058 npm error enoent ENOENT: no such file or directory, lstat 'C:\Users\Simon Wintz\AppData\Roaming\npm' npm error enoent This is related to npm not being able to find a file. npm error enoent
npm error A complete log of this run can be found in: C:\Users\Simon Wintz\AppData\Local\npm-cache_logs\2024-06-24T15_37_51_336Z-debug-0.log
But without it it runs ok. The best I found to be able to re-run the project is:
npm clean npm install npm run build
The other point is
cd packages/scrabble-solver npm run dev
It displays :
C:\Users\Simon Wintz\scrabble-solver\packages\scrabble-solver>npm run dev
@scrabble-solver/scrabble-solver@2.13.8 dev env-cmd next dev
▲ Next.js 14.2.4
- Local: http://localhost:3000
Environments: .env
✓ Starting... ✓ Ready in 4s
and then nothing. Sorry I am new to node.js and in fact I have no idea what should happen. Is this normal ? Am I missing something?
Thank you for the details @SimonW68! It looks like the readme really needs to be more specific on how to run the project - I will try to improve it.
So there are 2 cases:
npx scrabble-solver@latest
npm run dev -w @scrabble-solver/scrabble-solver
in the root directory of the project
npx scrabble-solver@latest
to run the project▲ Next.js 14.2.4
Local: http://localhost:3000/ Environments: .env
✓ Starting... ✓ Ready in 4s
and then nothing. Sorry I am new to node.js and in fact I have no idea what should happen. Is this normal ? Am I missing something?
There's a link to http://localhost:3000/ in that message - just open that link in your browser.
Hello Kamil,
thanks for the update.
unfortunately, for me npm run dev -w @scrabble-solver/scrabble-solver in the root directory of the project does the same as npm run dev in the package directory, that is : ✓Starting... ✓Ready in 4.5s and then nothing more happens. Am I supposed to run an IDE ore something ?
Anyway I intent to train myself to node.js from the start soon, because I am intersted in it. Maybe I'll come back to you then after.
Just one more question : for the time being, I am looking for a pure scrabble solver. I do not care too much about the user interface (by the way, yours is top). What I need is to run auomatic Scrabble games and collect some data. The few solvers proposed on GitHub beside yours are all uncomplete.
Woud you know where I can find this ?
thanks for your help.
Best Regards, Simon Wintz
Le lun. 24 juin 2024 à 20:22, Kamil Mielnik @.***> a écrit :
Thank you for the details @SimonW68 https://github.com/SimonW68! It looks like the readme really needs to be more specific on how to run the project - I will try to improve it.
So there are 2 cases: You want to use the app as it is
- Just go to https://scrabble-solver.org
- the app smartly detects whether to use your CPU or the server's CPU (based on which is faster after measuring performance for the first 5 solves)
- If you want to install it on your machine, all you need is Node.js and then run npx @.***
- the only use-case I see for that is if you want to use the app while offline later on (note: while offline, solving will work but dictionary definitions won't)
- you don't need to clone or download the source code from GitHub
You want to make modifications to the source code
- You need to clone or download the source code from GitHub
- Then follow instructions from the Develop https://github.com/kamilmielnik/scrabble-solver?tab=readme-ov-file#develop section README
- To run the app use npm run dev -w @scrabble-solver/scrabble-solver in the root directory of the project
- Don't use npx @.*** to run the project
▲ Next.js 14.2.4
Local: http://localhost:3000/ Environments: .env
✓ Starting... ✓ Ready in 4s
and then nothing. Sorry I am new to node.js and in fact I have no idea what should happen. Is this normal ? Am I missing something?
There's a link to http://localhost:3000/ in that message - just open that link in your browser.
— Reply to this email directly, view it on GitHub https://github.com/kamilmielnik/scrabble-solver/issues/331#issuecomment-2187154342, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFWSU6R24RBS7SD4KSIG3KLZJBPVHAVCNFSM6AAAAABJYMYPESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBXGE2TIMZUGI . You are receiving this because you were mentioned.Message ID: @.***>
unfortunately, for me npm run dev -w @scrabble-solver/scrabble-solver in the root directory of the project does the same as npm run dev in the package directory, that is : ✓Starting... ✓Ready in 4.5s and then nothing more happens.
Just open http://localhost:3000/ in your browser. Does it work for you @SimonW68 ?
Just one more question : for the time being, I am looking for a pure scrabble solver. I do not care too much about the user interface (by the way, yours is top). What I need is to run auomatic Scrabble games and collect some data. The few solvers proposed on GitHub beside yours are all uncomplete. Woud you know where I can find this ?
This project is modular, i.e. it's divided into multiple packages, one of which is called "solver" - I believe this is the closest thing to what you're looking for. That package deals specifically with the algorithmic part of the app, there's no UI involved. See solve.test.ts for some examples how to use the API.
When it comes to other projects, the only "complete" one I know of is called Quackle. It also comes with UI but I'm not sure how modular it is.
I updated the README with more details, hopefully it makes things more clear (099e084860097a63c0a941ea64d7080ec4c57b44). I will close the issue for now. @SimonW68 please do let me know if you're still experiencing issues.
Hello Kamil,
yes I tried to open http://localhost:3000/ before trying npm run dev again.
The fact is it went a bit further as before. I have a few more lines:
C:\Users\Simon Wintz\scrabble-solver\packages\scrabble-solver>npm run dev
*> @@.** dev
> env-cmd next dev
▲ Next.js 14.2.4 - Local: http://localhost:3000 http://localhost:3000*
✓ Starting... ✓ Ready in 4.8s ○ Compiling / ... ✓ Compiled / in 44.3s (1152 modules) GET / 200 in 40925ms ○ Compiling /api/visit ... ✓ Compiled /api/visit in 14.7s (473 modules) PUT /api/visit 200 in 15085ms PUT /api/visit 200 in 15099*ms
But then it is stuck again.
Well thanks anyway, I'll come back to that issue later. You can close the issue on GitHub.
Regards, Simon Wintz
Le mer. 26 juin 2024 à 20:59, Kamil Mielnik @.***> a écrit :
I updated the README with more details, hopefully it makes things more clear (099e084 https://github.com/kamilmielnik/scrabble-solver/commit/099e084860097a63c0a941ea64d7080ec4c57b44 ). I will close the issue for now. @SimonW68 https://github.com/SimonW68 please do let me know if you're still experiencing issues.
— Reply to this email directly, view it on GitHub https://github.com/kamilmielnik/scrabble-solver/issues/331#issuecomment-2192433361, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFWSU6RT3ZJREMZAWYZ2HSDZJMFQNAVCNFSM6AAAAABJYMYPESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJSGQZTGMZWGE . You are receiving this because you were mentioned.Message ID: @.***>
I could not find a way to exit from the game before the end. So I used Ctrl-A to interrupt. But after it becomes impossible to re-run the game. Following error messages:
Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id at setupFsCheck (C:\Users\Simon Wintz\scrabble-solver\node_modules\next\dist\server\lib\router-utils\filesystem.js:151:19) at async initialize (C:\Users\Simon Wintz\scrabble-solver\node_modules\next\dist\server\lib\router-server.js:61:23) at async Server. (C:\Users\Simon Wintz\scrabble-solver\node_modules\next\dist\server\lib\start-server.js:249:36)
npm error Lifecycle script
start
failed with error: npm error Error: command failed npm error in workspace: @scrabble-solver/scrabble-solver@2.13.8 npm error at location: C:\Users\Simon Wintz\scrabble-solver\packages\scrabble-solver ERROR: "start:app" exited with 1. node:child_process:965 throw err; ^And the page does not open, blocked by local host.