Closed rclement closed 3 years ago
Will investigate! Could you spin up a small example?
Hello, I have the same here ! Here my repo: https://github.com/Campus-INSA-CVL/campus-website/tree/dev
Just run: npm run build
and the error will appear !
nuxt: ^2.13.3 @nuxtjs/feed: ^2.0.0
@manniL Sorry for the delay. I could not build a good reproduction use-case for this issue.
However, after some digging I uncovered that since commit 8832f39, the usage of fs-extra.outputFile
has been replaced with fs.writeFileSync
. However, there is a subtle behavior change: while fs-extra.outputFile
was creating all parent directories automatically, fs.writeFileSync
does not. Thus all parent directories need to be created if not present already.
And it seems that in some rare weird cases, @nuxtjs/feed
tries to output feed files without the output directories in place in "generate mode", causing this issue.
I came up with PR #87 which attempts to fix this issue in the simplest possible way.
@Barbapapazes If you're interested, you can try the fix from PR #87 using npm install github:rclement/feed-module#fix-generate-failure
. I tried it on my personal website where the issue originated and it fixed the build.
Ok, nice ! So I try on my project and it works, no error ! Thank you !
@manniL Sorry for the delay. I could not build a good reproduction use-case for this issue. ....... I came up with PR #87 which attempts to fix this issue in the simplest possible way.
@Barbapapazes If you're interested, you can try the fix from PR #87 using
npm install github:rclement/feed-module#fix-generate-failure
. I tried it on my personal website where the issue originated and it fixed the build.
Works like a charm. Any plans of merging it back to master?
@paulrays It has been merged back to master (https://github.com/nuxt-community/feed-module/commit/7c8595d16bdf78bf3f5104a98252e4bd75dc4067) but never been released with a new version.
Alternatively, you can install using npm install github:nuxt-community/feed-module#master
Hi,
After migrating to version 2.0.0, I can use
nuxt generate
successfully on my local machine. However, when running CI/CD pipelines on GitHub Actions, the generation always fails with the same error:It seems related to the execution context of GitHub Actions virtual machines (
ubuntu-latest
) and of course I cannot reproduce the error anywhere. Reverting to@nuxtjs/feed
version 1.1.0 immediately fixes the build.Any ideas on what's going on? Could it be related to the recent switch to using
fs.writeFileSync
in@nuxtjs/feed/lib/module.js
? (8832f39bf02af7dcacb6115fbd45318e9b633be6)Let me know if I can provide some more help. Thanks!
Context: