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

Updating JavaScript with Incremental Kills Dev Server #30

Open
khalidabuhakmeh opened this issue Mar 17, 2023 · 5 comments
Open

Updating JavaScript with Incremental Kills Dev Server #30

khalidabuhakmeh opened this issue Mar 17, 2023 · 5 comments

Comments

@khalidabuhakmeh
Copy link

I've noticed that the server dies when running the dev server with Vite and incremental, specifically when changing JavaScript files. I think it has to do with a ~ at the end of the file name, which I'm not exactly sure where it's coming from. Here's the Error.

errno = -2
code = "ENOENT"
syscall = "stat"
path = "../../public/assets/js/video.js~"
stack = "Error: ENOENT: no such file or directory, stat '../../public/assets/js/video.js~'"
message = "ENOENT: no such file or directory, stat '../../public/assets/js/video.js~'"

When the error is throw, I get the following from running 11ty in debug mode.

[11ty] Eleventy fatal watch error:
[11ty] EACCES: permission denied, scandir '/var/agentx' (via Error)
  Eleventy:EleventyErrorHandler (error stack): Error: EACCES: permission denied, scandir '/var/agentx' +0ms
  Eleventy Cleaning up chokidar and server instances, if they exist. +23ms

I am using Node v19.6.0 and NPM 9.4.0

@zachleat
Copy link
Member

well, this is curious! vitejs/vite#9509

@zachleat
Copy link
Member

And just to be clear, the file name you’re using there is video.js~? Or do you have more context as to where the ~ is coming from?

@khalidabuhakmeh
Copy link
Author

khalidabuhakmeh commented Mar 17, 2023

The file name is video.js on disk. I am assuming that since asset changes are stored and served from memory, they have a ~ added to denote any changes I've made have not yet been written to the output directory of _site.

Screenshot 2023-03-17 at 11 04 35

Update: FYI, I tried updating Vite to the latest release of 4.2.0 but still have the same issue.

@zachleat
Copy link
Member

zachleat commented Mar 17, 2023

Ah hmm, my confusion here is that the only usage of ~ in Vite projects I know of is for alias prefixing, I’ve never heard of ~ being appended in that manner. This might be worth asking on the Vite repo?

I don’t think that URL transformation is coming from the Eleventy piece of the Eleventy Vite plugin, and I’m struggling to think of any util in the larger Eleventy org that would do this either.

@khalidabuhakmeh
Copy link
Author

OK, I'll ask about it in the Vite project.

As a sanity check to ensure it's not a "my environment" thing, I spun up a remote development environment and ran into the same issue.

Screenshot 2023-03-17 at 11 16 35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants