Summary
The PCF control build failed with error [pcf-1014] [Error] Manifest validation problem: instance requires property "manifest". This issue arose due to incorrect configuration in the pcfconfig.json file, specifically the missing or misnamed "manifest" property under the control definition.
Root Cause
- Misconfiguration in
pcfconfig.json: The"manifest"property was either missing or incorrectly named under the control-specific configuration. - Inconsistent Manifest References: The
package.jsonandpcfconfig.jsonfiles referenced the manifest file differently, causing validation failure.
Why This Happens in Real Systems
- Multiple Configuration Files: PCF controls rely on both
package.jsonandpcfconfig.jsonfor build settings, leading to potential inconsistencies. - Case Sensitivity: XML and JSON files are case-sensitive, and typos in property names (e.g.,
"manifest"vs"Manifest") can cause errors. - Tooling Limitations:
pcf-scriptsdoes not always provide clear error messages, making root cause analysis challenging.
Real-World Impact
- Blocked Development: Inability to build the PCF control halts progress on the Azure Maps integration.
- Time Wasted: Developers spend excessive time debugging due to unclear error messages.
- Deployment Delays: Critical features like address autofill and error handling cannot be deployed until the issue is resolved.
Example or Code (if necessary and relevant)
// Incorrect pcfconfig.json
{
"outDir": "out",
"schema": "1.0.1",
"controls": {
"AzureMapsAddressAutofill": {
"Manifest": "ControlManifest.Input.xml" // Incorrect property name
}
},
"namespace": "RR"
}
// Corrected pcfconfig.json
{
"outDir": "out",
"schema": "1.0.1",
"controls": {
"AzureMapsAddressAutofill": {
"manifest": "ControlManifest.Input.xml" // Corrected property name
}
},
"namespace": "RR"
}
How Senior Engineers Fix It
- Verify Configuration Consistency: Ensure
"manifest"is correctly spelled and referenced in bothpackage.jsonandpcfconfig.json. - Clean and Rebuild: Run
npm run cleanfollowed bynpm run buildto clear cached files. - Validate XML Schema: Use an XML validator to ensure
ControlManifest.Input.xmlcomplies with PCF schema requirements. - Check Case Sensitivity: Confirm all property names match the expected case (e.g.,
"manifest"not"Manifest").
Why Juniors Miss It
- Overlooking Configuration Files: Juniors often focus on code changes and neglect configuration files like
pcfconfig.json. - Misinterpreting Errors: The error message
"instance requires property 'manifest'"is misleading, as the property exists but is misnamed. - Lack of PCF Tooling Experience: Limited familiarity with
pcf-scriptsand its quirks leads to longer debugging times.