Problems with Setting Up NFT Contract - Missing Files and Build Issues

I’m attempting to follow a guide on building NFT contracts, but I’m facing multiple challenges. The downloaded repository appears incomplete.

The first problem is the absence of a file structure I’m expecting. I can’t find the path /contracts/rust/Cargo.toml in the repository.

The second issue is that there’s no package.json, which leads to a failure during the build process. When I execute the build command, it crashes.

To troubleshoot, I created a simple package.json to see if it would help:

{
    "name": "nft-project"
}

This resolves the missing file issue, yet I’m still hitting a different error:

yarn run v1.22.17
error Command "build:rs" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Do I need to create these files and the build script myself, or should they already be part of the tutorial? Has anyone else faced similar issues while developing NFT contracts?

Oh wow, this sounds frustrating! I’ve been down this rabbit hole before with incomplete tutorials :sweat_smile:

Which guide are you following? That’d help us figure out what’s going wrong. Some NFT contract tutorials are from 6 months ago - basically ancient history in crypto dev time lol

The missing build:rs script is interesting. Sounds like it should compile rust code, but if the whole contracts/rust folder is missing, yeah that won’t work. You sure you cloned the right branch? Sometimes main is empty and all the actual code lives on develop or something.

What blockchain are you targeting? Near? Solana? The rust folder makes me think it’s not ethereum…

Did you check for prerequisites or setup steps earlier in the guide that might create those missing files? Sometimes there’s a separate initialization step that generates the boilerplate.

Curious what others think - anyone else recognize this error pattern?

I hit this exact issue last year with an NFT tutorial. Missing Cargo.toml and package.json files usually mean you’re either using an outdated guide or the repo got restructured after it was published. The build:rs script goes in your package.json scripts section and compiles the Rust contract code. But since you’re missing the whole contracts/rust directory, just adding package.json won’t fix it. Check if the tutorial has a starter template or boilerplate repo you’re supposed to clone first. Most NFT guides assume you start with a specific project template that already has the build configs and folder structure. You’re probably missing that initial setup step. Also double-check you’re using the latest version of the guide - contract toolchains change constantly and tutorials go stale fast.

totally get it! this happens a lot, right? sometimes the guides are outdated or incomplete. maybe try looking at repo issues or contact the author for updates. good luck!