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 · 16 comments
Closed

Error: failed to prune cache "assets" #5745

rahilwazir opened this issue Mar 9, 2019 · 16 comments

Comments

@rahilwazir
Copy link

@rahilwazir 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 bep commented Mar 9, 2019

Pretty sure this is the same as #5673

@rahilwazir
Copy link
Author

@rahilwazir rahilwazir commented Mar 9, 2019

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

@neslinesli93 neslinesli93 commented Apr 2, 2019

@rahilwazir did you find the bug?

@rahilwazir
Copy link
Author

@rahilwazir rahilwazir commented Apr 2, 2019

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

@neslinesli93
Copy link

@neslinesli93 neslinesli93 commented Apr 2, 2019

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

@neslinesli93 neslinesli93 commented Apr 3, 2019

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

@neslinesli93 neslinesli93 commented Apr 3, 2019

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

@rhazdon
Copy link

@rhazdon 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 neslinesli93 commented Apr 3, 2019

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

@rhazdon
Copy link

@rhazdon 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 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 THeK3nger commented Jun 17, 2019

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

@jzeneto
Copy link

@jzeneto jzeneto commented Sep 9, 2019

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

@jpcaruana
Copy link

@jpcaruana jpcaruana commented Apr 16, 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

@hayorov
Copy link

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

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

Successfully merging a pull request may close this issue.

None yet
8 participants