Error at /opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/zephyr_module.cmake:72

I am trying to build the matter lock sample app using VS code and the latest SDK. But I'm getting this error after creating the project and trying to add a build configuration to it: 

* Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for /Users/redacted/code/nordic/myapps/lock

Building lock
west build --build-dir /Users/redacted/code/nordic/myapps/lock/build /Users/redacted/code/nordic/myapps/lock --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/Users/redacted/code/nordic/myapps/lock"

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/redacted/code/nordic/myapps/lock
-- Found Python3: /opt/nordic/ncs/toolchains/v2.3.0/bin/python3.9 (found suitable exact version "3.9.6") found components: Interpreter
-- Cache files will be written to: /Users/redacted/Library/Caches/zephyr
-- Zephyr version: 3.2.99 (/opt/nordic/ncs/v2.3.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
CMake Error at /opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/zephyr_module.cmake:72 (message):
Unmet or cyclic dependencies in modules:

/opt/nordic/ncs/v2.3.0/modules/lib/matter depends on: ['openthread']



Call Stack (most recent call first):
/opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
/opt/nordic/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/opt/nordic/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:27 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/v2.3.0/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/v2.3.0/bin/python3 -B/Users/redacted/code/nordic/myapps/lock/build -GNinja -DBOARD=nrf52840dk_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DBOARD_ROOT:STRING=/Users/redacted/code/nordic/myapps/lock -S/Users/redacted/code/nordic/myapps/lock

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

Related