frigate-hass-card: Build errors on the 4.1.0 branch
- [ X ] I updated to the latest version available
- [ X ] I cleared the cache of my browser
Release with the issue: 4.1.0
Last working release (if known): 4.0.0
Browser and Operating System: Debian 11 / Chrome
Description of problem:
I’m trying to build the new 4.1.0 branch in order to test the improvements to go2rtc support, but getting errors on the build that I can’t figure out:
~/frigate-hass-card$ nvm use 18.15.0
Now using node v18.15.0 (npm v9.5.0)
~/frigate-hass-card$ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.14s.
all good… but the build fails…
~/frigate-hass-card$ yarn run build
yarn run v1.22.19
$ yarn run lint && yarn run rollup
$ eslint 'src/**/*.ts'
$ rollup -c
src/card.ts → dist...
[!] (plugin rpt2) Error: src/types.ts:189:3 - error TS2345: Argument of type 'ZodObject<{ confirmation: ZodOptional<ZodUnion<[ZodBoolean, ZodObject<{ text: ZodOptional<ZodString>; exemptions: ZodOptional<ZodArray<ZodObject<{ user: ZodString; }, "strip", ZodTypeAny, { ...; }, { ...; }>, "many">>; }, "strip", ZodTypeAny, { ...; }, { ...; }>]>>; action: ZodLiteral<...>; }, "passthrough", ZodType...' is not assignable to parameter of type 'ZodType<CustomActionConfig & ExtendedConfirmationRestrictionConfig, any, any>'.
Types of property '_type' are incompatible.
Type 'objectOutputType<{ confirmation: ZodOptional<ZodUnion<[ZodBoolean, ZodObject<{ text: ZodOptional<ZodString>; exemptions: ZodOptional<ZodArray<ZodObject<{ user: ZodString; }, "strip", ZodTypeAny, { ...; }, { ...; }>, "many">>; }, "strip", ZodTypeAny, { ...; }, { ...; }>]>>; action: ZodLiteral<...>; }, ZodTypeAny, "pa...' is not assignable to type 'CustomActionConfig & ExtendedConfirmationRestrictionConfig'.
Type 'objectOutputType<{ confirmation: ZodOptional<ZodUnion<[ZodBoolean, ZodObject<{ text: ZodOptional<ZodString>; exemptions: ZodOptional<ZodArray<ZodObject<{ user: ZodString; }, "strip", ZodTypeAny, { ...; }, { ...; }>, "many">>; }, "strip", ZodTypeAny, { ...; }, { ...; }>]>>; action: ZodLiteral<...>; }, ZodTypeAny, "pa...' is not assignable to type 'CustomActionConfig'.
Types of property 'confirmation' are incompatible.
Type 'boolean | { text?: string | undefined; exemptions?: { user: string; }[] | undefined; } | undefined' is not assignable to type 'ConfirmationRestrictionConfig | undefined'.
Type 'false' has no properties in common with type 'ConfirmationRestrictionConfig'.
189 actionBaseSchema
~~~~~~~~~~~~~~~~
190 .extend({
~~~~~~~~~~~~~
...
192 })
~~~~~~
193 .passthrough(),
~~~~~~~~~~~~~~~~~~
src/types.ts:204:63 - error TS2339: Property 'extend' does not exist on type 'ZodType<CustomActionConfig & ExtendedConfirmationRestrictionConfig, any, any>'.
204 const frigateCardCustomActionsBaseSchema = customActionSchema.extend({
~~~~~~
src/types.ts
at error (/home/james/frigate-hass-card/node_modules/rollup/dist/shared/rollup.js:198:30)
at throwPluginError (/home/james/frigate-hass-card/node_modules/rollup/dist/shared/rollup.js:21718:12)
at Object.error (/home/james/frigate-hass-card/node_modules/rollup/dist/shared/rollup.js:22672:20)
at Object.error (/home/james/frigate-hass-card/node_modules/rollup/dist/shared/rollup.js:21895:42)
at RollupContext.error (/home/james/frigate-hass-card/node_modules/rollup-plugin-typescript2/src/context.ts:81:17)
at /home/james/frigate-hass-card/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:37:17
at Array.forEach (<anonymous>)
at printDiagnostics (/home/james/frigate-hass-card/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:9:14)
at typecheckFile (/home/james/frigate-hass-card/node_modules/rollup-plugin-typescript2/src/index.ts:66:3)
at Object.transform (/home/james/frigate-hass-card/node_modules/rollup-plugin-typescript2/src/index.ts:236:5)
error Command failed with exit code 1.
Thanks for any help.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (12 by maintainers)
Interesting. I will try changing this on my side to see if it helps with https://github.com/dermotduffy/frigate-hass-card/issues/1000 as well, instead of reverting the PR.