Configuration warning for layers using 'artifact' attribute

I have been consistently getting a configuration error for my layers configuration. See here:

layers:
  dependencies:
    name: !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:${self:service}-${opt:stage, 'dev'}-dependencies
    compatibleRuntimes:
      - nodejs14.x
    package:
      artifact: "layers/mdaDependencies.zip"

The error reads “Configuration warning at ‘layers.dependencies.name’: should be string” which it appears to be for me. Has anybody else encountered this?