Can't build plasma-workspace

When i run sudo make install -j4 && systemsettings kcm_grub2, I get the following error.

CMake Error at CMakeLists.txt:17 (find_package):
  Could not find a configuration file for package "ECM" that is compatible
  with requested version "5.240.0".

  The following configuration files were considered but not accepted:

    /usr/share/ECM/cmake/ECMConfig.cmake, version: 5.104.0
    /home/thenujan/kde/usr/share/ECM/cmake/ECMConfig.cmake, version: 5.108.0

-- Configuring incomplete, errors occurred!
make: *** [Makefile:8836: cmake_check_build_system] Error 1

System specs
Operating System: Manjaro Linux
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.1.23-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 7.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: HP
Product Name: HP Pavilion x360 Convertible 14-dw1xxx

I thought the issue might be that kde frameworks being built with qt5 as I had branch-group kf5-qt5 in kdesrc-buildrc so I tried removing it and building plasma-workspace again with kdesrc-build but it still seems to use kf5 branch as it is showing Merging kxmlgui changes from branch kf5 .

So what do I have to do inorder to resolve this issue