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

addPassthroughCopy hangs indefinitely (regression from Eleventy 2.0.1) #3594

Open
switch-to-gitlab opened this issue Dec 18, 2024 · 0 comments

Comments

@switch-to-gitlab
Copy link

switch-to-gitlab commented Dec 18, 2024

Operating system

NixOS 24.05.6043.64b80bfb316b (Uakari) x86_64

Eleventy

3.0.0

Describe the bug

I'm working to upgrade my Eleventy blog from 2.0.1 to 3.0.0, and I'm having trouble with addPassthroughCopy hanging indefinitely when passing through my front end scripts folder. When it hangs, it hangs quite convincingly. Ctrl-c doesn't seem to work so I just kill the terminal window and after that it takes a very long time to shut down my laptop because it takes a few minutes to kill whatever zombie processes are coming from node.

I tried hard to figure out if it's a particular file causing it to hang, and I failed, unfortunately, but I do have what should be a nice reproducible example below.

If you go through the steps below you should be able to reproduce it consistently, but I wasn't able to narrow it down to one particular file. On a given group of files, occasionally it might succeed.

I would also like to say I've enjoyed Eleventy for a number of years now and am grateful for your work. I've made a few converts talking up the virtues of Eleventy, and I stand by it!

Reproduction steps

This repo is a reproducible example.

  1. Clone this repo.
  2. Optionally install nix and use my shell.nix to see it with the exact version of Node I'm using.
  3. cd scripts/demos/notifications-demo
  4. npm i && npm run build
  5. cd ../../ # go back to scripts folder
  6. cd sw-loader
  7. npm i && npm run build
  8. cd ../ # go back to scripts folder
  9. cd wb-service-worker
  10. npm i && npm run build
  11. cd ../../ # go back to root of repository
  12. npm i && npm run build

This should hang pretty much every time you run it. You can see in the eleventy.config.js where I tried to drill down into the scripts folder to see if there's one specific file or directory that's causing it to hang, and that doesn't seem to be the case, so if you want you can maybe replace all the addPassthroughCopy lines I introduced with .addPassthroughCopy("./scripts/") and it should
also reproduce pretty consistently and be closer to what I was trying to do.

Expected behavior

The all the files in the scripts folder should appear in the _site output directory. It would also be good if I could kill a hung process with Ctrl-c.

Reproduction URL

https://gitlab.com/eleanorofs/eleventy-passthrough-issue

Screenshots

This is a screencap of npm run debug. Obviously you can't tell from the screenshot, but it is hanging in this screenshot.

image

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

No branches or pull requests

1 participant