Fragment shader error when adding lightmap to PBRMaterial

Hello guys,

I have created a new PBRMaterial like this…

    let mat = new PBRMaterial('new',this._scene);
    mat.albedoTexture = diffuse;
    mat.useLightmapAsShadowmap = true;
    mat.lightmapTexture = lightmap;
   mat.unlit = true; 
  for(let i = 0 ; i < meshes.length ; i++)
  {
    let mesh =result.meshes[i];
    mesh.material = mat;
  }

I get the following error when I run the game…

BJS - [09:44:52]: Error: FRAGMENT SHADER ERROR: 0:449: ‘lightmapColor’ : undeclared identifier
ERROR: 0:449: ‘rgb’ : field selection requires structure, vector, or interface block on left hand side

Am I doing something wrong?

Duplicate of Fragment shader error on assigning lightmap to PBRMaterial