JacobLinCool / JacobLinCool/LeetCode-Dump
No generation of the README.md withing "leetcode" folder
- Dominant language
- TypeScript
- Stars
- 8
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Hi @JacobLinCool.
Thank you for your efforts in developing this dumper. However, I encountered an issue. On my Leetcode profile, I noticed that there are fewer available solutions than submitted. Consequently, when I run the following command:
```
docker run --rm -v $(pwd)/leetcode:/leetcode jacoblincool/leetcode-dump -s "xyz"
```
It doesn't generate the README.md file within the leetcode folder, unlike what is observed in your [LeetCode-Solutions](https://github.com/JacobLinCool/LeetCode-Solutions) repository.


The aforementioned issue leads to an error when I try to build the solutions as a static website
```
docker run --rm -v $(pwd)/leetcode:/leetcode -v $(pwd)/site:/site jacoblincool/leetcode-dump build
```
Error message
```
[Transform] Error: ENOENT: no such file or directory, open '/leetcode/README.md'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at transform (/leetcode-dump/lib/leetcode-dump.js:174:127)
at build (/leetcode-dump/lib/leetcode-dump.js:223:3)
at Command. (/leetcode-dump/lib/leetcode-dump.js:460:3)
at Command.listener [as _actionHandler] (/leetcode-dump/node_modules/.pnpm/commander@9.0.0/node_modules/commander/lib/command.js:480:17)
at /leetcode-dump/node_modules/.pnpm/commander@9.0.0/node_modules/commander/lib/command.js:1234:65
at Command._chainOrCall (/leetcode-dump/node_modules/.pnpm/commander@9.0.0/node_modules/commander/lib/command.js:1151:12)
at Command._parseCommand (/leetcode-dump/node_modules/.pnpm/commander@9.0.0/node_modules/commander/lib/command.js:1234:27)
at Command._dispatchSubcommand (/leetcode-dump/node_modules/.pnpm/commander@9.0.0/node_modules/commander/lib/command.js:1057:25) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/leetcode/README.md'
}
```
Not fully sure if the root of the issue is the missing README.md or elsewhere. I just guessed it was the missing file because the above error message.
Thanks in advance for any help :smile:
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/leetcode-dump.js at the transform and build locations shown in the stack trace, then reproduce the dump and build Docker commands from the issue. Check how the root README.md is expected to be created or consumed, and consider the work done when the dump produces the file and the build completes without the ENOENT error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100