sui
sui copied to clipboard
Failed to build Move modules
Steps to Reproduce Issue
I had some errors when trying to build the project: Failed to build Move modules: Failed to resolve dependencies for package 'test'
e.g.
- choco install sui
- sui move new test
- cd test && sui move build
Expected Result
Successful
Actual Result
UPDATING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
Failed to build Move modules: Failed to resolve dependencies for package 'test'
Caused by:
0: Fetching 'Sui'
1: Failed to reset to latest Git state 'framework/testnet' for package 'Sui', to skip set --skip-fetch-latest-git-deps | Exit status: exit code: 128.
System Information
- OS: Windows 11
- Compiler: sui 1.21.1-5f2bfb1-dirty
- sui client active-env: testnet
- rustup -V: rustup 1.27.0 (bbb9276d2 2024-03-08)
- git -v: git version 2.41.0.windows.3
Hi @datznt ,
It might be that the git checkout in your cache seems broken in some way -- the fix is to delete the cache from .move (or delete the whole of ~/.move at the moment). Be careful before deleting any files/folders to make sure you're not deleting any needed files.
Hi @datznt ,
It might be that the git checkout in your cache seems broken in some way -- the fix is to delete the cache from .move (or delete the whole of ~/.move at the moment). Be careful before deleting any files/folders to make sure you're not deleting any needed files.
Thanks for replying
I tried deleting the .move folder and it didn't resolve.
Other ways I have tried: sui move build --force
Sorry to hear that. Let's try to find more information about your environment.
Is it possible to share your Move toml file? I can try to reproduce on a Windows machine if I get the toml.
Sorry to hear that. Let's try to find more information about your environment.
Is it possible to share your Move toml file? I can try to reproduce on a Windows machine if I get the toml.
Try this command and you will have Move toml file:
sui move new test
Or contents of my Move toml file:
[package]
name = "test"
# edition = "2024.alpha" # To use the Move 2024 edition, currently in alpha
# license = "" # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."] # e.g., ["Joe Smith ([email protected])", "John Snow ([email protected])"]
[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" }
# For remote import, use the `{ git = "...", subdir = "...", rev = "..." }`.
# Revision can be a branch, a tag, and a commit hash.
# MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" }
# For local dependencies use `local = path`. Path is relative to the package root
# Local = { local = "../path/to" }
# To resolve a version conflict and force a specific version for dependency
# override use `override = true`
# Override = { local = "../conflicting/version", override = true }
[addresses]
test = "0x0"
# Named addresses will be accessible in Move as `@name`. They're also exported:
# for example, `std = "0x1"` is exported by the Standard Library.
# alice = "0xA11CE"
[dev-dependencies]
# The dev-dependencies section allows overriding dependencies for `--test` and
# `--dev` modes. You can introduce test-only dependencies here.
# Local = { local = "../path/to/dev-build" }
[dev-addresses]
# The dev-addresses section allows overwriting named addresses for the `--test`
# and `--dev` modes.
# alice = "0xB0B"
Thanks for the info. I am able to reproduce the error on Win10. I am looking into it and hope to get back soon with more info on how to fix this.
Thanks for your patience. I relayed internally that something is wrong. In the meantime, if you can, I'd recommend to use an older version. I tested the v1.20.0 on my Win10 machine and it compiled successfully. You can either install it via choco
choco uninstall sui
choco install sui --version=1.20.0
or you can download the release binary https://github.com/MystenLabs/sui/releases
Thanks for your patience. I relayed internally that something is wrong. In the meantime, if you can, I'd recommend to use an older version. I tested the v1.20.0 on my Win10 machine and it compiled successfully. You can either install it via choco
choco uninstall sui choco install sui --version=1.20.0
or you can download the release binary https://github.com/MystenLabs/sui/releases
Love it, hope Sui will be better
We're working on improving Windows support, so please keep filing issues to help us identify unknown issues.
We're working on improving Windows support, so please keep filing issues to help us identify unknown issues.
Hi, I tried v1.19.1 and it worked with command sui move build --skip-fetch-latest-git-deps. Versions from v1.20.0 and above all have the same problem like:
>> sui -V
sui 1.20.0-8ea6008-dirty
>> sui move build
UPDATING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
Failed to build Move modules: Failed to resolve dependencies for package 'wasi'
Caused by:
0: Fetching 'Sui'
1: Failed to reset to latest Git state 'framework/testnet' for package 'Sui', to skip set --skip-fetch-latest-git-deps | Exit status: exit code: 128.
When I build with flag --skip-fetch-latest-git-deps it shows another error like:
>> sui move build --skip-fetch-latest-git-deps
INCLUDING DEPENDENCY Sui
INCLUDING DEPENDENCY MoveStdlib
BUILDING wasi
Total number of linter warnings suppressed: 2 (filtered categories: 1)
Failed to build Move modules: The system cannot find the path specified. (os error 3).
@datznt thanks for the detailed info. That does not sound good. I'll look into it asap.
@datznt thanks for the detailed info. That does not sound good. I'll look into it asap.
I found many people with the same error as me on discord. Now i will work with version v1.19.1
Thanks for reporting this. It might be some issue related to folder permissions somehow. If you ever get the chance, you could try to use sui move build --install-dir <DIR>
and give a path to a directory where you have full access.
Alternatively, you could try with a different terminal though I guess that's not the issue, but who knows how permissions are handled by the console.
@datznt could you also tell me your Git version?
@datznt could you also tell me your Git version?
here: git version 2.41.0.windows.3
I also meet same error in macOs
os version: Macos sonoma 14.4.1 sui version: 1.21.1 git version: 2.39.3 (Apple Git-146) rustc 1.77.0 (aedd173a2 2024-03-17) @stefan-mysten
@windyund thanks for reporting. Have you tried any of the suggested fixes (remove .move folder, install older version, etc), and did any of those work?
Steps to Reproduce Issue
I had some errors when trying to build the project: Failed to build Move modules: Failed to resolve dependencies for package 'test'
e.g.
- choco install sui
- sui move new test
- cd test && sui move build
Expected Result
Successful
Actual Result
UPDATING GIT DEPENDENCY https://github.com/MystenLabs/sui.git Failed to build Move modules: Failed to resolve dependencies for package 'test' Caused by: 0: Fetching 'Sui' 1: Failed to reset to latest Git state 'framework/testnet' for package 'Sui', to skip set --skip-fetch-latest-git-deps | Exit status: exit code: 128.
System Information
- OS: Windows 11
- Compiler: sui 1.21.1-5f2bfb1-dirty
- sui client active-env: testnet
- rustup -V: rustup 1.27.0 (bbb9276d2 2024-03-08)
- git -v: git version 2.41.0.windows.3
check your Move.tml and edit the [dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "testnet" }
@summertoo I tried v1.19.1 and it worked
@datznt
v1.19.1 is ok.
but v1.20.1 and v1.21.1 is not work... >-<
We are still investigating. But we have noticed that it seems to be working with PowerShell. You might try that and see if it resolves any issues while we continue to try and fix the root problem.
In addition to PowerShell, try enabling long paths via git config
:
git config --system core.longpaths true
I'm still getting this error with 1.19.1 version. Any idea?
sui -V: sui 1.19.1-041c5f2-dirty
@huisq are you on Windows? If yes, can you do the following and let us know if any worked or not:
- move your Move project as close as possible to C:\
- delete the .move folder in your project, including any external crates folder, and any Move.lock files
- set your
git config --system core.longpaths true
- share your Move.toml file
- run
sui move build --skip-fetch-latest-git-deps
Yes, using Windows My Move.toml `[package] name = "MyFirstPackage" version = "0.0.1"
[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/devnet" }
[addresses]
my_first_package = "0x0"`
now it just doesn't build at all
and with sui move build --skip-dependency-verification
@datznt v1.19.1 is ok. but v1.20.1 and v1.21.1 is not work... >-<
It seems that using Powershell is working properly
@huisq thanks. The --skip-dependency-verification
flag is for sui client publish
, sorry, I messed them up.
What terminal are you using? Can you try with Powershell with admin rights?
We think we have fixed it for windows with cmd.exe. Sorry about the issue! The fix should be out in 1.23
@windyund thanks for reporting. Have you tried any of the suggested fixes (remove .move folder, install older version, etc), and did any of those work?
I can execute it in Powershell, but the terminal fails
still fails for me at powershell, terminal, and basically tried every solution above.
@huisq sorry to hear that. Could you please provide a bit more details about your setup?
- win version
- git version
- rustup version (if you have them installed)
- rustc version (if you have them installed)
- sui version, and have you tried an older version like 1.19, or 1.18?
- choco version if you used choco.
- could you tell us if your folder where this package exists has a long path? We found that some of our test files have very long names, leading to issues on Windows due its max 260 char path length. Basically, when git clones the Move repository, it silently complains about long file paths (thus the potential solution with git long paths enabled).
- powershell version
- share your Move.toml file