NowSDK Metadata Conflicts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi community,
Hope you're all doing fine. After upgrading to the NowSDK v4.0.0 release, I've been getting weird WARN messages when running the transform command in a NowSDK app developed locally in my computer. It looks like it's getting confused as to which version of several records should take precence.
I tried in a sandbox branch deleting all metadata records, the Key file but no luck in getting this resolved.
[now-sdk] WARN: Record "sys_ui_policy_action_2167cbebebf106507daff603dad0cd93" is defined 2 times in the project:
1. src/fluent/client/ui_policy/sys_ui_policy_action_2167cbebebf106507daff603dad0cd93.now.ts:3
2. src/fluent/client/ui_policy/sys_ui_policy_action_2167cbebebf106507daff603dad0cd93.now.ts:3
[now-sdk] WARN: Record "sys_ui_policy_25b6c7ebebf106507daff603dad0cd46" is defined 2 times in the project:
1. src/fluent/client/ui_policy/sys_ui_policy_25b6c7ebebf106507daff603dad0cd46.now.ts:3
2. src/fluent/client/ui_policy/sys_ui_policy_25b6c7ebebf106507daff603dad0cd46.now.ts:3
[now-sdk] WARN: Record "sys_ui_policy_127a3ea6eb369a907daff603dad0cdb2" is defined 2 times in the project:
1. src/fluent/client/ui_policy/sys_ui_policy_127a3ea6eb369a907daff603dad0cdb2.now.ts:3
2. src/fluent/client/ui_policy/sys_ui_policy_127a3ea6eb369a907daff603dad0cdb2.now.ts:3
[now-sdk] WARN: Record "sys_data_policy_rule_ac74788febedd2907daff603dad0cd84" is defined 2 times in the project:
1. src/fluent/client/ui_policy/sys_data_policy_rule_ac74788febedd2907daff603dad0cd84.now.ts:3
2. src/fluent/client/ui_policy/sys_data_policy_rule_ac74788febedd2907daff603dad0cd84.now.ts:3
[now-sdk] WARN: Record "sys_data_policy_rule_9c84f88febedd2907daff603dad0cd1e" is defined 2 times in the project:
1. src/fluent/client/ui_policy/sys_data_policy_rule_9c84f88febedd2907daff603dad0cd1e.now.ts:3
2. src/fluent/client/ui_policy/sys_data_policy_rule_9c84f88febedd2907daff603dad0cd1e.now.ts:3
[now-sdk] WARN: Record "sys_data_policy_rule_2064f48febedd2907daff603dad0cdec" is defined 2 times in the project:
1. src/fluent/client/ui_policy/sys_data_policy_rule_2064f48febedd2907daff603dad0cdec.now.ts:3
2. src/fluent/client/ui_policy/sys_data_policy_rule_2064f48febedd2907daff603dad0cdec.now.ts:3
[now-sdk] WARN: Record "sys_data_policy2_ae44b48febedd2907daff603dad0cd0d" is defined 2 times in the project:
1. src/fluent/client/ui_policy/sys_data_policy2_ae44b48febedd2907daff603dad0cd0d.now.ts:3
2. src/fluent/client/ui_policy/sys_data_policy2_ae44b48febedd2907daff603dad0cd0d.now.ts:3
[now-sdk] WARN: Total of 1015 conflicts found. The last entry from each conflict will take precedence.
[now-sdk] Transform completed successfully
Thanks in advance,
- Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @UIB Whisperer ,
This warning happens because after upgrading to NowSDK v4.0.0, your local project still has old metadata files, so the same records are defined twice.
You can fix it by cleaning the old files and pulling fresh metadata. Please try these steps:
Back up any local edits in src/fluent if you have them.
mv src/fluent src/fluent_backup
Delete old generated files and caches
rm -rf src/fluent rm -rf .now rm -rf node_modules/.cache
Pull a fresh copy of metadata
now-sdk pull
Run the transform again
now-sdk transform
After this, the duplicate record warnings should be gone. If you had manual edits in src/fluent, merge them back from your backup.
Here is the visualize way that u can understand
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Can I see a sample of one of those now.ts files with the errors? Typically you get this when re-using a Now.ID on two different records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have the same warnings appearing, here is an example from one of my now.ts files that triggers a warning during build and transforms.
[now-sdk] WARN: Record "sys_embedded_help_role_714c5f0487b14510e9a8cb7f8bbb3525" is defined 2 times in the project:
1. src/fluent/generated/sys_embedded_help_role_714c5f0487b14510e9a8cb7f8bbb3525.now.ts:3
2. src/fluent/generated/sys_embedded_help_role_714c5f0487b14510e9a8cb7f8bbb3525.now.ts:3
import { Record } from '@servicenow/sdk/core'
export default Record({
$id: '714c5f0487b14510e9a8cb7f8bbb3525',
table: 'sys_embedded_help_role',
data: {
order: 1000,
role: '36bbd70487b14510e9a8cb7f8bbb3544',
sys_name: '36bbd70487b14510e9a8cb7f8bbb3544',
},
})