Open userquin opened 2 years ago
@userquin how did you make it work?
thanks @userquin for the effort. I need to check it out better, It wasn't registering the manifest, so not showing the app name, icons etc. I am gonna have a look at it today
@ctwhome also got the same error... on built it doesnt take the css (windicss) when I uncommented the build-pwa.ts
@ctwhome Did you manage to find a solution? Been trying the last couple of days but no success...
start_url works in development but when deployed it doesn't... not sure why
I can't find the problem either ☹️
@PMLS3 where are you deploying the app (vercel, netlify, custom server)? beware, the app needs a server middleware for some resources, just check the nuxt module added and maybe you cannot use it on your deployment.
Can you also provide some more input? some log and some screenshots for output build directory.
Right now, there is no static site generation available on nuxt3 so you must deploy the nuxt3 app and start the server module, I think.
As I mention on pwa plugin repo it is a POC and we should wait to nuxt team solution. It should work on local, but it is not ready for production (I mean to be deployed on production environment).
some more inputs: I built it using node 16.11.0 LTS
In my case, I just serve it on Netlify. I am just thinking if the middleware could be hosted as a cloud function on vercel or netlify. Thanks for the response!
I think we should close this issue and leave the comments on the readme of the template
@PMLS3 where are you deploying the app (vercel, netlify, custom server)? beware, the app needs a server middleware for some resources, just check the nuxt module added and maybe you cannot use it on your deployment.
Can you also provide some more input? some log and some screenshots for output build directory.
I am deploying it to Google Cloud with Dockerbuild
PWA results by Lighthouse
@userquin when I build local and run npm run start, the start_url gets picked up...
UnhandledPromiseRejectionWarning: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/usr/src/app/.output/server/chunks/client.manifest.mjs' imported from /usr/src/app/build-pwa.ts
Might be what is wrong when I went through the build log:
@PMLS3 uhmm, can you check the file is there? it seems the error comes from using the dynamic import to load the client manifest to add the pages to the sw precache manifest.
EDIT: I mean, this file exists => /usr/src/app/.output/server/chunks/client.manifest.mjs
the build log cannot be downloaded
@PMLS3
Be sure you have at least node v14.17.0 (I recommend at least 14.18.0), with node 16.11.0 LTS I have not that problem. Just check node --version
on your deploy.
On your local is it working (build + serve)?
@PMLS3
Be sure you have at least node v14.17.0 (I recommend at least 14.18.0), with node 16.11.0 LTS I have not that problem. Just check
node --version
on your deploy.On your local is it working (build + serve)?
Yes local build + serve works 100%, trying to figure out where to see my build files on google cloud. Will let you know about the file as soon as I get it. Will try up my Dockerfile to use node v-16
the build log cannot be downloaded
@ctwhome sorry, here is the txt build log.txt
@ctwhome Can you see if /usr/src/app/.output/server/chunks/client.manifest.mjs has build on yourside?
nope, nothing there
nope, nothing there
@userquin seems like it doesn't build with the file. Do you perhaps know why it doesn't. Locally it builds fine
@PMLS3 maybe you can ask on nuxt repo
I have it working, what's the problem here? I use
pnpm
, I update my fork and run the build script again, updating the build pwa script.