Issue with nuxi generate
See original GitHub issueHello, 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 a pages
folder and rename it to index.vue
(closer to a real world configuration), with the same command I get this error :
ℹ Prerendering 1 initial routes with crawler
├─ / (48ms)
├─ /manifest.f92523ca.json (4ms) (Error: [404] Page not found: /manifest.f92523ca.json)
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 😃
Issue Analytics
- State:
- Created a year ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
Fails immedeately when `nuxt generate --fail-on-error ... - GitHub
A problem I've found for now is the condition between failOnFirstError config option and --fail-on-error CLI option. I have 3 ideas: existing -- ......
Read more >Issues when generating NUXT build - Stack Overflow
Save this question. Show activity on this post. I am building a nuxt ssr app and whenever I run build command, I get...
Read more >The generate Property - Nuxt
It accepts an array of string or regular expressions and will prevent generation of routes matching them. The routes will still be accessible...
Read more >Nuxt Static Improvements - NuxtJS
... the rendering and build process. The only issue was that most Nuxt.js users weren't able to unleash the full potential of the...
Read more >Some Problems I Had in Nuxt JS (and how to solve them)
Each folder created in the store folder will create a new module for the store. However, as long as we are coding or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is just about Nitro trying to crawl a file as a route, I’d say.
The manifest link is grabbed from HTML : https://github.com/unjs/nitro/blob/main/src/prerender.ts#L112
Then it is not ignored cause
json
has been tagged as allowed extension : https://github.com/unjs/nitro/blob/main/src/prerender.ts#L10 https://github.com/unjs/nitro/blob/main/src/prerender.ts#L122Let’s wait for some @pi0 thoughts about this.
Should be fixed by https://github.com/kevinmarrec/nuxt-pwa-module/commit/fa800723f86de346343a4ea434346d79beda6989. I’ve tested to local serve a generated Nuxt 3 PWA app (with
nuxi generate
) and it sounds to work well.Will be available in next release.