Sui.

Post

Share your knowledge.

MoonBags.
Jul 25, 2025
Expert Q&A

Do we have number of dependecies restriction that we can import in sui move ?

'VMError with status LINKER_ERROR at location UNDEFINED and message Cannot find ModuleId { address: cffcf0347987e02e617af864f42a4eb964ba94465abf0875053db4ec3c2b2f81, name: Identifier("cc") } in data cache

I am getting this error

what is this error ? can someone help here ?

  • Sui
  • SDKs and Developer Tools
0
3
Share
Comments
.

Answers

3
Owen.
Owen4662
Jul 30 2025, 17:07

The error LINKER_ERROR with "Cannot find ModuleId" occurs when the Move compiler or runtime cannot locate a dependency you are trying to import. This typically happens if the module at the specified address is not published on the network, the address or module name is misspelled, or the dependency is not correctly listed in your Move.toml file.

Sui Move does not impose a hard limit on the number of dependencies, but all imported modules must be published and accessible on the target network (e.g., testnet, mainnet).

To fix:

  1. Verify the package address and module name are correct.
  2. Ensure the dependency is published on the current network.
  3. Confirm the dependency is declared in Move.toml with the right address mapping.
  4. If using a third-party package, check its documentation for correct import syntax and network availability.
7
Comments
.
Arnold.
Arnold3036
Jul 29 2025, 15:12

Sui Move does not enforce a strict dependency limit, but this error occurs when a dependency is missing or incorrectly referenced in your Move.toml.

Fix the Error:

  1. Check Move.toml: Ensure all dependencies are properly declared.

    [dependencies]
    Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework", rev = "framework/testnet" }
    
  2. Verify Module Addresses:

    • The error Cannot find ModuleId means the VM can't locate module cc at address cffcf0....
    • Ensure the dependency's address in Move.toml matches the module's published address.
  3. Clean & Rebuild:

    sui move clean  # Clear cached artifacts
    sui move build # Rebuild
    

Common Causes:

  • Missing dependency in Move.toml.
  • Incorrect address for the dependency.
  • Outdated framework version (e.g., using testnet vs mainnet).

Debug Steps:

sui move prove --dump-bytecode  # Inspect module linkages
5
Comments
.
shamueely.
Jul 26 2025, 18:15

You're seeing the error VMError with status LINKER_ERROR at location UNDEFINED and message Cannot find ModuleId because your Sui Move module is trying to import or call something from a module (cc) that doesn’t exist in the current build or wasn’t deployed to the network. The message is saying: “I looked for a module at address 0xcffc...f81 with the name cc, but couldn’t find it.”

This isn’t about exceeding a limit on the number of dependencies. Rather, it’s a linking error caused by one of the following:

  • You specified a dependency in your Move code like use 0xcffc...f81::cc::SomeFunction;, but the module cc was never published to the chain or not present in the build output.
  • You may have a stale or incorrect address in your Move.toml or import statement.
  • The dependency was removed or updated in the upstream package, and your code is referencing an outdated module or address.

✅ How to Fix It

  1. Check your Move.toml Make sure you have this module listed properly in [dependencies], or that you're not trying to use an external module without linking it.

  2. Inspect your imports Look through your .move files and see if you have any line like:

use 0xcffc...f81::cc::SomeFunction;

If cc doesn’t exist or isn’t part of your current build scope, that import will fail.

  1. Remove or correct the dependency If the module was renamed, removed, or you don't need it anymore, delete the import. If you do need it, make sure to either:

    • Publish the cc module at the specified address, or
    • Update the address and name to match your local or remote dependency.

🔍 What This Error Means

This is not a restriction on the number of dependencies. Sui Move doesn't impose a hard cap on how many modules you can import—but every module you import must be present in your package or linked dependencies at compile or execution time.

You can read more about dependency linking and Move.toml structure here: https://docs.sui.io/build/move/manage-dependencies

2
Comments
.

Do you know the answer?

Please log in and share it.