core: Error when creating index: illegal operation on a directory
When I run the command npx make-index --output src\osdrive or npx make-index -o src\osdrive , i get the same illegal operation on a directory error.
PS C:\Users\e79217\Downloads\CeetahOS> npx make-index --output src \osdrive
Generated listing for Users/e79217/Dwnloads/CheetahOS
node:fs:2341
return bindlng.writeFileUtf3(
^
Error: EISDIR: illegal operation on a directory, open 'C:\Users\e79217\Downoads\CheetahOS\src\osdrive'
at writeFileSync (node:fs:2341:20)
at file:///C:/Users/e79217/Downloads/CheetahOS/node_modules/@zenfs/core/scripts/make-index.js:213:1
at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:485:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:109:5)
errno: -4068,
code: 'EISOIR',
syscall: 'open',
path: 'C:\\Users\\e79221\\Downloads\Cheetah06\\src\\osdrive
What could be the cause? And again, thanks for the assist
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 27 (12 by maintainers)
No.
configurewill reconfigure the FS every time you call it. It is intended to be run once, so I recommend you run it once during program initialization. If you have access to top-levelawait, I strongly encourage you to use it.If you would like to continue using a flag, A guard clause would be more readable (and decrease indentation):
Also @chinonso098 Please stop posting screenshots of your code. It is next to impossible to copy the code, which is making helping you very difficult. As stated in the contributing.md, โPlease copy logs, terminal output, and code into a code block in the issue or PR. Do not include screenshots since those are very difficult to debug.โ So far Iโve manually been rewriting your screenshots into code blocks but it is making me a little frustrated. Sorry to give you all this, but its important to follow the guidelines on issues.
Thank you, thank you, thank you
We have data ๐๐๐
@chinonso098
--output/-oexpects a file path, not a directory. It is used to customize the index JSON file path.Iโve included the output of
make-index --helpfor your reference: