-
Notifications
You must be signed in to change notification settings - Fork 32
Issue with nuxi generate #7
Comments
@jsulpis I didn't play a lot with Nuxt 3 I still think we should keep But in the other hand, it seems Nuxt 3 recognize any I'll need to have a closer look, as I don't really want to have to move it to assets and rename it to Feel free to suggest a fix if you find some :) EDIT: I tried to move it to assets, it does not fix the issue : |
I think this is done by @pi0 Do you have a clue about why Nitro is trying to crawl the manifest file ? :) |
I wonder if it could be an issue in nuxt3 / nitro, because I tried to remove the link tag at the end of the app: {
buildAssetsDir: '/assets/',
head: {
link: [
{'rel': 'manifest', href: '/assets/manifest.f92523ca.json'}
]
}
}, and the same 404 error comes back on the manifest file. This does not seem right to me |
Your configuration from your |
This is just about Nitro trying to crawl a file as a route, I'd say. The manifest link is grabbed from HTML : Then it is not ignored cause Let's wait for some @pi0 thoughts about this. |
Not module issue. Prerender is experimental. If ssr is false, html will be clean and get rid of error. |
Closing as the problem isn't caused by this module implementation but needs to be fixed upstream. One workaround is disabling crawler in import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
generate: {
crawler: false
}
}) This will prevent @pi0 @danielroe
|
/cc @pi0 @danielroe What are the next steps to fix this ? :) |
I opened nitrojs/nitro#308. |
Great @danielroe thanks ! |
See nitrojs/nitro#308 (comment) for a recommendation for how to generate the manifest instead which would resolve this issue within this module. |
@danielroe About the possible fix, It means serving |
Exactly. |
Should be fixed by fa80072. Will be available in next release. |
Hello,
first of all, thank you for this module !
I would like to use it with static generation and this does not seem to work.
In your repo, when I run
pnpm nuxi generate example
, I get the following error :ℹ Prerendering 1 initial routes with crawler ├─ / (43ms) ├─ /manifest.f92523ca.json (undefinedms) (Error: EEXIST: file already exists, mkdir '/path/to/nuxt-pwa-module/example/.output/public/manifest.f92523ca.json')
The build output seems to be fine. However, when I move the
app.vue
file into apages
folder and rename it toindex.vue
(closer to a real world configuration), with the same command I get this error :In this case, the content of the manifest file is corrupted, so the app is not installable.
Maybe the manifest file should be moved into the assets folder ? or ignored during the prerendering somehow ?
I am OK to contribute if it helps you and if you give me some indications :)
The text was updated successfully, but these errors were encountered: