dot(lightDir,normalize(normal))
is the dot product. So it returns a scalar.
max(scalar, scalar)
also evaluates to a scalar.
Therefore:
vec3 NdotL = max(dot(lightDir,normalize(normal)),0.0);
Attempts to assign a scalar to a vector. Which is invalid.
So what you probably wanted was:
float NdotL = max(dot(lightDir,normalize(normal)),0.0);
gl_FragColor = vec4((NdotL * diffuse.rgb + ambient.rgb), gl_FrontMaterial.diffuse.a);