Build cardano wallet

When I run cabal build all on the terminal it gives me that error on building the cardano-wallet-core-2022.1.18… library
attempting to use module ‘main:Cardano.Wallet.Api.Malformed’ (test/unit/Cardano/Wallet/Api/Malformed.hs) which is not loaded
cabal: Failed to build test:unit from cardano-wallet-core-2022.1.18.