Errors when renaming files
richb-hanover opened this issue · comments
I'm not sure if this is a reveal.js error or a Docker/reveal-md error message. I cloned version 5.2.0, ran the docker command (THIS IS VERY COOL!). I used -v /Users/my-user/github/reveal-md/slides/:/slides
to pass a directory of .md files. This works fine: going to http://localhost:1948
gives a page that lists the slideshows in the directory, and clicking the link gets to the slide show. I observed two problems:
- While Docker was running, I changed from "readme.md" to "Test Slides.md", and got the error below. This is not a serious problem. I just hit ^C, and restarted the docker image and I was back on the air.
- I duplicated the file, and changed the new file to
Test Slides #2.md
I got the "home page" as expected. Clicking "Test Slides.md" goes to the slide show. ClickingTest Slides #2.md
link doesn't change the browser window. The link from the browser ishttp://localhost:1948/Test Slides #2.md
Again, this is not a serious problem - I avoid file names with#
and things work fine.
Thanks for a cool project!
(node:1) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/slides/readme.md'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Both issues are pretty rare indeed.
- I think this could be handled in reveal-md by a file watcher, but in my opinion it's not worth it to actively support this edge case.
- Hashes can't be used in Markdown file names for slides, since the hash in a url represents a fragment identifier, and specifically, the slide number for reveal.js.
These are things that could be documented in some "troubleshooting" section or something, though.
Yup. I agree that these are rare cases. I just reported them to make sure you knew ("We promise not to fix it if we don't know it's broke...")
The error message for #1 is good enough (it displays the affected file name)
It might be nice to say that you can't use #
in slide file names someplace. But I'm not sure where you could put it so that I would have seen it...
Maybe leave everything alone. Thanks again.