near/cargo-near

Not actionable error message on `cargo near build` in a fresh project without git

Opened this issue · 0 comments

frol commented

cargo near build command relies on the project being part of a git repository with at least one commit, which causes confusion and build errors for users unfamiliar with this dependency.

create-near-app creates a project without git, but even after git init it is not enough to understand how to build the project:

image image

If you are unfamiliar with cargo-near, you would never know that you can use --no-docker to build the contract.

I suggest improving the output to hint users to commit the changes and about --no-docker flag to workaround it until they are ready for deployment (using --no-docker should not be encouraged for production use)