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

Error: failed to prune cache "assets" #5745

Closed
rahilwazir opened this issue Mar 9, 2019 · 17 comments
Closed

Error: failed to prune cache "assets" #5745

rahilwazir opened this issue Mar 9, 2019 · 17 comments
Labels

Comments

@rahilwazir
Copy link

rahilwazir commented Mar 9, 2019

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

@bep
Copy link
Member

bep commented Mar 9, 2019

Pretty sure this is the same as #5673

@rahilwazir
Copy link
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

@neslinesli93
Copy link

@rahilwazir did you find the bug?

@rahilwazir
Copy link
Author

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

@neslinesli93
Copy link

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...

@neslinesli93
Copy link

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

@rhazdon
Copy link

rhazdon commented Apr 3, 2019

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

@neslinesli93
Copy link

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

@rhazdon
Copy link

rhazdon commented Apr 3, 2019

@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.

@neslinesli93
Copy link

neslinesli93 commented Apr 3, 2019

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

@rhazdon
Copy link

rhazdon commented Apr 3, 2019

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

@rhazdon
Copy link

rhazdon commented Apr 15, 2019

@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?

@THeK3nger
Copy link

THeK3nger commented Jun 17, 2019

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

@josineto
Copy link

josineto commented Sep 9, 2019

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

@jpcaruana
Copy link

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

@hayorov
Copy link

hayorov commented May 10, 2020

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.

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants