Skip to content

Error: failed to prune cache "assets" #5745

Closed

Description

@rahilwazir

I'm using the following theme: https://github.com/rhazdon/hugo-theme-hello-friend-ng.git

And when I try to deploy it on Netlify, I face the following error.

> hugo --gc --minify
Total in 27 ms
Error: failed to prune cache "assets": remove /home/x/x/resources/_gen/assets/js/js/main.js_d11fe7b62c27961c87ecd0f2490357b9.content: no such file or directory

This also happens on my local machine.

Hugo Static Site Generator v0.54.0/extended linux/amd64 BuildDate: 2019-02-01T13:31:26Z

Activity

  1. bep commented on Mar 9, 2019

    @bep
    Member

    Pretty sure this is the same as #5673

  2. rahilwazir commented on Mar 9, 2019

    @rahilwazir
    Author

    I'm not sure but to give you more detail..

    Terminal
    terminal

    File Tree

    sidebar

    There are two nested js and scss directories, Is it intentional?

    Let me know if it still the same as #5673

  3. neslinesli93 commented on Apr 2, 2019

    @neslinesli93

    @rahilwazir did you find the bug?

  4. rahilwazir commented on Apr 2, 2019

    @rahilwazir
    Author

    Nah man, I changed my theme and it worked out for me. Are you using the theme?

  5. neslinesli93 commented on Apr 2, 2019

    @neslinesli93

    Yep, however I went and used hello-friend, and it works like a charm. I'd like to use this one because the defaults look way better...

  6. neslinesli93 commented on Apr 3, 2019

    @neslinesli93

    Unfortunately we can't open issues on hello-friend-ng repo, so I'm pinging @rhazdon and hope he sees it

  7. rhazdon commented on Apr 3, 2019

    @rhazdon

    @neslinesli93, thanks for pinging. I will take a look at it. I've also enabled the issue tracker for the repo...

  8. neslinesli93 commented on Apr 3, 2019

    @neslinesli93

    Thanks man, I was sending you an email regarding the issue, but thankfully you enabled issues...

  9. rhazdon commented on Apr 3, 2019

    @rhazdon

    @neslinesli93, @rahilwazir

    I checked the issue and found the problem. The "bug" is the resources folder in the theme itself. Usually, you don't need this folder, so feel free and delete it. Then it should work as expected.

    Hugo asked me to add the folder to the repo gohugoio/hugoThemes#577 (comment), because hello-friend-ng uses the Hugo asset pipelines instead of webpack (or similar tools). That means that your assets are genreated completly fresh when you compile your project.
    Netlify had some issues with this pipeline stuff... I don't know if it is already fixed.

  10. neslinesli93 commented on Apr 3, 2019

    @neslinesli93

    How can we do this by keeping your theme as a submodule?

  11. rhazdon commented on Apr 3, 2019

    @rhazdon

    @digitalcraftsman, do you know maybe, if the issue regarding the hugo asset pipeline and the theme page (Netlify) is solved?

  12. rhazdon commented on Apr 15, 2019

    @rhazdon

    @digitalcraftsman Sorry for tagging you again. Are there any news regarding Netlify? Is it possible to delete the resources folder from the repo without crashing the example pages?

  13. THeK3nger commented on Jun 17, 2019

    @THeK3nger

    The https://github.com/htr3n/hyde-hyde theme has the same problem.

  14. added a commit that references this issue on Sep 9, 2019
  15. josineto commented on Sep 9, 2019

    @josineto

    The Hermit theme has the same problem (as @kimfucious and I have reported here).
    @Track3

  16. jpcaruana commented on Apr 16, 2020

    @jpcaruana

    For me force removing _gen folders before runnning hugo works fine, and build is ok on netlify

    In my netlify.toml:

    command = "find . -name _gen -exec rm -rf {} + ; hugo --gc --minify"

    Hope this helps

  17. hayorov commented on May 10, 2020

    @hayorov

    For me force removing _gen folders before runnning hugo works fine, and build is ok on netlify

    In my netlify.toml:

    command = "find . -name _gen -exec rm -rf {} + ; hugo --gc --minify"

    Hope this helps

    Reasonable workaround. Thanks.

  18. github-actions commented on Feb 3, 2022

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  19. locked as resolved and limited conversation to collaborators on Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions