Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

now-sdk tranform followed by now-sdk build fails (version 4.11.2)

Brady Holliday
Tera Guru

I am having an issue where I run a now-sdk transform and it transforms data from the instance, but when I do an immediate now-sdk build it fails with errors like:

 

[now-sdk] WARN: src/fluent/server/system/properties/<redacted>_activity_fields.sys_properties.now.ts:5:11 - warning TS11: Property names should begin with '<redacted>' to match the app scope and avoid collisions with properties from other scopes

5 name: 'glide.ui.<redacted>_activity.fields',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[now-sdk] ERROR: src/fluent/generated/sc-cat-item-guide/sc_cat_item_guide_<redacted>.now.ts:57:9 - error TS2353: Object literal may only specify known properties, and 'cc_render_type' does not exist in type 'Data<"sc_cat_item_guide">'.

57 cc_render_type: 'system',

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[now-sdk] ERROR: src/fluent/client/ui/application-menus/<redacted>.sys_app_application.now.ts:26:9 - error TS2353: Object literal may only specify known properties, and 'survey_overwrite' does not exist in type 'Data<"sys_app_module">'.

26 survey_overwrite: 'true',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[now-sdk] ERROR: src/fluent/client/ui/table/<redacted>/ui-policies/<redacted>.sys_ui_policy.now.ts:20:13 - error TS2322: Type '""' is not assignable to type 'fieldMessageType'.

20 fieldMessageType: '',

 

Fluent APIs:

 - Property

 - UiPolicy

 - Record

 

Is there any other way to fix this besides having to do a //@fluent-ignore above every line?

1 REPLY 1

boteeuwen
Tera Guru

This usually happens because the metadata coming from the instance contains fields that your local SDK type definitions do not know about yet. That can happen after instance upgrades, different patch levels, installed store apps, or custom changes. Before adding fluent ignore to a lot of generated lines, I’d first clear the local caches and refresh the SDK dependencies from the instance. Then run pull, transform, and build again so the generated metadata and local types are in sync. In many cases that fixes these schema mismatch errors without having to ignore them manually.