Getting this error > yarn build , -while trying SDK

oot@fedrik-NS12T5:/home/fedrik/concordocriumSDK/concordium-node-sdk-js# yarn build
➤ [@concordium/rust-bindings]: Process started
➤ [@concordium/rust-bindings]: Error: Error during execution of cargo metadata: error: failed to get concordium-contracts-common as a dependency of package concordium-rust-bindings v0.1.0 (/home/fedrik/concordocriumSDK/concordium-node-sdk-js/packages/rust-bindings)
➤ [@concordium/rust-bindings]:
➤ [@concordium/rust-bindings]: Caused by:
➤ [@concordium/rust-bindings]: failed to load source for dependency concordium-contracts-common
➤ [@concordium/rust-bindings]:
➤ [@concordium/rust-bindings]: Caused by:
➤ [@concordium/rust-bindings]: Unable to update /home/fedrik/concordocriumSDK/concordium-node-sdk-js/deps/concordium-contracts-common
➤ [@concordium/rust-bindings]:
➤ [@concordium/rust-bindings]: Caused by:
➤ [@concordium/rust-bindings]: failed to read /home/fedrik/concordocriumSDK/concordium-node-sdk-js/deps/concordium-contracts-common/Cargo.toml
➤ [@concordium/rust-bindings]:
➤ [@concordium/rust-bindings]: Caused by:
➤ [@concordium/rust-bindings]: No such file or directory (os error 2)
➤ [@concordium/rust-bindings]:
➤ [@concordium/rust-bindings]: Process exited (exit code 1), completed in 1s 171ms
➤ The command failed for workspaces that are depended upon by other workspaces; can’t satisfy the dependency graph
➤ Failed with errors in 1s 191ms

Hi @ninjacoder and welcome to the Concordium support forum!

If you just want to use the node/web SDK, then you can use one of our published packages on NPM instead of building it yourself. The packages are:

If your goal is to contribute to one of the SDKs (which we greatly appreciate :wink: ) or you need a feature that is not yet part of a published package, then you will need to build the SDKs yourself (as you have been attempting).

You are seeing that error because the repository has Git submodules, and they also need to be cloned.
You can do that by running
git submodule update --init --recursive inside the directory with the cloned repository.

In the future, when cloning repositories with submodules, you can also use git clone --recursive <repository-to-clone>, which will also clone the submodules.

Best regards,


Thanks !! okay I will try it.