Expand Minimize

Don't use the same id for multiple web parts

Different Web Parts in the same project shouldn't be using the same IDs

CheckId SPF010702
TypeName WebPartIdIsUnique
Severity CriticalError
Type Web Part Manifest

Each web part should use a unique id value that identifies that particular web part. When multiple web parts are defined in one project, each web part should use a different id.

Bad practice
Weather.manifest.json:

{
  "$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",

  "id": "8908df13-a965-4445-9c48-ecec77c44be4",
  "alias": "WeatherWebPart",
  "componentType": "WebPart",
  "version": "0.0.1",
  "manifestVersion": 2,

  "preconfiguredEntries": [{
    "groupId": "8908df13-a965-4445-9c48-ecec77c44be4",
    "group": { "default": "Default" },
    "title": { "default": "Weather" },
    "description": { "default": "Shows weather for the given place" },
    "officeFabricIconFontName": "Sunny",
    "properties": {
      "location": ""
    }
  }]
}


WeatherList.manifest.json:
{
  "$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",

  "id": "8908df13-a965-4445-9c48-ecec77c44be4",
  "alias": "WeatherListWebPart",
  "componentType": "WebPart",
  "version": "0.0.1",
  "manifestVersion": 2,

  "preconfiguredEntries": [{
    "groupId": "8908df13-a965-4445-9c48-ecec77c44be4",
    "group": { "default": "Default" },
    "title": { "default": "Weather" },
    "description": { "default": "Shows weather for the given places" },
    "officeFabricIconFontName": "Sunny",
    "properties": {
      "locations": ""
    }
  }]
}


Good practice
Weather.manifest.json:
{
  "$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",

  "id": "8908df13-a965-4445-9c48-ecec77c44be4",
  "alias": "WeatherWebPart",
  "componentType": "WebPart",
  "version": "0.0.1",
  "manifestVersion": 2,

  "preconfiguredEntries": [{
    "groupId": "8908df13-a965-4445-9c48-ecec77c44be4",
    "group": { "default": "Default" },
    "title": { "default": "Weather" },
    "description": { "default": "Shows weather for the given place" },
    "officeFabricIconFontName": "Sunny",
    "properties": {
      "location": ""
    }
  }]
}


WeatherList.manifest.json:
{
  "$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",

  "id": "8908df13-a965-4445-9c48-ecec77c44be5",
  "alias": "WeatherListWebPart",
  "componentType": "WebPart",
  "version": "0.0.1",
  "manifestVersion": 2,

  "preconfiguredEntries": [{
    "groupId": "8908df13-a965-4445-9c48-ecec77c44be4",
    "group": { "default": "Default" },
    "title": { "default": "Weather" },
    "description": { "default": "Shows weather for the given places" },
    "officeFabricIconFontName": "Sunny",
    "properties": {
      "locations": ""
    }
  }]
}

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.