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

Can't rename lesson folder while dev is running #218

Open
henrikvilhelmberglund opened this issue Aug 6, 2024 · 3 comments
Open

Can't rename lesson folder while dev is running #218

henrikvilhelmberglund opened this issue Aug 6, 2024 · 3 comments
Labels
windows Issue releated specifically to Windows

Comments

@henrikvilhelmberglund
Copy link
Contributor

Describe the bug

I think this could be a Windows specific issue but I can't rename folders while I've got a dev server running. It works fine if the server is stopped.

It's a bit annoying right now because my ideal workflow is create lesson -> copy paste folder -> rename folder which doesn't really work smoothly right now.

This could also be an Astro issue and not specific to TutorialKit.

Link to a StackBlitz project which shows the error

https://stackblitz.github.com/henrikvilhelmberglund/unocss-tutorial

Steps to reproduce

It may be needed to reproduce locally in VSCode if this is a Windows specific issue.

  1. Start dev server.
  2. Copy paste folder.
  3. Rename folder.

Expected behavior

Expected: folder is renamed.
Actual: (in VSCode) nothing happens. After a while an

Error: EPERM: operation not permitted, rename 'c:\Github\unocss-tutorial\src\content\tutorial\1-basics\2-rules\4-multple-rules-simple copy' -> 'c:\Github\unocss-tutorial\src\content\tutorial\1-basics\2-rules\5-multiple-properties-advanced'

error appears.

Screenshots

No response

Platform

  • TutorialKit version: No idea how to see the used version
  • OS: Windows 10
  • Browser: N/A
  • Version: N/A

Additional context

No response

@AriPerkkio
Copy link
Member

Does it work correctly if you don't open VS Code at all? Start TutorialKit from terminal and rename the directory on terminal or file explorer. Just wondering if there's some VS Code plugin that causes this.

@Nemikolh
Copy link
Member

Nemikolh commented Aug 6, 2024

Hey @henrikvilhelmberglund! Thanks for the report!

From a quick testing, this seems to not be the case on MacOS or Linux. This is probably a Windows specific issue. It could be either Astro or TutorialKit related though. One way to verify that would be to remove from your configuration the tutorialkit integration:

  1. Edit your astro.config.ts to remove the tutorialkit() call
  2. Run the dev server again
  3. Try the copy

If this still fails, then it's Astro related. If not then it could maybe be caused by the watchers that we add to hot reload files with chokidar.

@henrikvilhelmberglund
Copy link
Contributor Author

Does it work correctly if you don't open VS Code at all? Start TutorialKit from terminal and rename the directory on terminal or file explorer. Just wondering if there's some VS Code plugin that causes this.

No, I still get an error as if the folder is locked:
image

  1. Edit your astro.config.ts to remove the tutorialkit() call
  2. Run the dev server again
  3. Try the copy

I tried removing tutorialkit(), creating /src/pages with a few folders and renaming the routes, it worked fine.

@AriPerkkio AriPerkkio added the windows Issue releated specifically to Windows label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issue releated specifically to Windows
Projects
None yet
Development

No branches or pull requests

3 participants