Closed JuanJoseGonGi closed 3 years ago
You are completely right!
The fcmPublicVapidKey was in the Firebase Configuration in an earlier version and we moved it to the messaging config, but it seems we forgot to change the types accordingly.
Fixed it with v7.1.2.
Appreciate the well documented issue - thanks a lot again!
Version
@nuxtjs/firebase: 7.1.1 firebase: 8.1.1 nuxt: 2.14.6 @nuxt/typescript-runtime: 2.0.0 @nuxt/types: 2.14.6 @nuxt/typescript-build: 2.0.3
Steps to reproduce
Use nuxt typescript runtime. https://typescript.nuxtjs.org/guide/runtime
Change nuxt.config.js by nuxt.config.ts
Define the nuxt config as
and export it at the bottom
![image](https://user-images.githubusercontent.com/29153242/101098683-5525c200-3591-11eb-995c-6364f0122cfc.png)
Add
"types": ["@types/node", "@nuxt/types", "@nuxtjs/firebase"]
on tsconfig.json file as specified on https://firebase.nuxtjs.org/tutorials/typescriptSet![image](https://user-images.githubusercontent.com/29153242/101098374-d2046c00-3590-11eb-909a-3141ae00081b.png)
fcmPublicVapidKey
value to any string onnuxt.config.ts
as shown below.What is Expected?
No error
What is actually happening?
Type '"any vapid key"' is not assignable to type '"<publicVapidKey>" | undefined'.
Maybe the types are wrong. The following image shows the type definition forfcmPublicVapidKey