[platformio]
lib_extra_dirs = ../../
src_dir=.

[common]
build_flags = -DMQTT_MAX_PACKET_SIZE=512
lib_deps_builtin =
lib_deps_external =
  PubSubClient
  WifiManager@0.12

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2
build_flags = ${common.build_flags}
lib_deps =
  ${common.lib_deps_builtin}
  ${common.lib_deps_external}

[env:d1_mini]
platform=espressif8266
framework=arduino
board=d1_mini
build_flags = ${common.build_flags}
lib_deps =
  ${common.lib_deps_builtin}
  ${common.lib_deps_external}

[platformio]
lib_extra_dirs = ../../
src_dir=.

[common]
build_flags = -DMQTT_MAX_PACKET_SIZE=512
lib_deps_builtin =
lib_deps_external =
  PubSubClient
  WifiManager@0.14

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2
build_flags = ${common.build_flags}
lib_deps =
  ${common.lib_deps_builtin}
  ${common.lib_deps_external}

[env:d1_mini]
platform=espressif8266
framework=arduino
board=d1_mini
build_flags = ${common.build_flags}
lib_deps =
  ${common.lib_deps_builtin}
  ${common.lib_deps_external}

Change required WifiManager lib version.
Change required WifiManager lib version.

Version 0.12 produce a compiler issue when used against ESP Core v2.4.2, Version 0.14 is fine.