anchor icon indicating copy to clipboard operation
anchor copied to clipboard

build failed with anchor-client 0.25.0

Open ViktorKirjanov opened this issue 2 years ago • 1 comments

Hi, i have no idea how to make a build with anchor-clien. I got an error:

error[E0583]: file not found for module `sys`
   --> src/lib.rs:124:1
    |
124 | mod sys;
    | ^^^^^^^^
    |
    = help: to create the module `sys`, create file "/Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/sys.rs" or "/Users/viktor/.cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.4/src/sys/mod.rs"

i have only 3 dependencies and it is possible to make a build without anchor-client. Any ideas?

anchor-lang = "0.25.0"
anchor-spl = "0.25.0"
anchor-client = "0.25.0"

anchor-cli 0.25.0 rustc 1.62.1 (e092d0b6b 2022-07-16)

ViktorKirjanov avatar Aug 09 '22 01:08 ViktorKirjanov

You import a module called sys but didn't include in your code. I think it is not related to dependencies.

SkyYap avatar Aug 17 '22 18:08 SkyYap

anchor-client cannot be used on-chain. See restrictions of on-chain programs.

acheroncrypto avatar Jun 23 '23 17:06 acheroncrypto