Forc build doesn't work on v0.49.3

I try to build the contract using forc build, but it fails:

Error: failed to fetch `https://github.com/fuellabs/sway`. Check your connection or run in `--offline` mode

I definitely don’t have problems with the internet. Running forc build --offline also doesn’t work:

Error: Unable to fetch pkg "std" from  Url { url: Url { scheme: Https, user: None, password: None, host: Some("github.com"), serialize_alternative_form: false, port: None, path: "/fuellabs/sway" } } in offline mode

Here’s the result of fuelup show:

fuelup show 
Default host: aarch64-apple-darwin
fuelup home: /Users/dzakh/.fuelup

installed toolchains
--------------------
latest-aarch64-apple-darwin (default)

active toolchain
----------------
latest-aarch64-apple-darwin (default)
  forc : 0.49.3
    - forc-client
      - forc-deploy : 0.49.3
      - forc-run : 0.49.3
    - forc-crypto : 0.49.3
    - forc-debug : Could not parse version (empty string, expected a semver version)
    - forc-doc : 0.49.3
    - forc-explore : 0.28.1
    - forc-fmt : 0.49.3
    - forc-lsp : 0.56.0
    - forc-tx : 0.49.3
    - forc-wallet : 0.4.3
  fuel-core : 0.22.4
  fuel-core-keygen : 0.22.4

fuels versions
--------------
forc : 0.54.0
forc-wallet : 0.54.0

Thank you so much for your attention and participation :smiling_face:

Btw, it’s a little bit unrelated, but I’m letting you know that the command from the quickstart fails since the latest version is 0.82.0 instead of 82.0.

1 Like

Hey @DZakh_envio.dev, can you try looking at this forum post with a similar issue and can you try this solution as it worked for them. Please lmk if the error still persists. Thanks

This solution resolved my problem. Thank you.

By the way, I’d like to share some of the gotchas I had while experimenting with building a simple contract. I hope they will be useful for the Fuel team:

  • No documentation on how to handle errors, e.g., no explanation on how to use require, revert , or what happens with .unwrap called on Result.
  • Quite many issues with making str work. Not possible to use it in storage. The try_as_str_array method from documentation wasn’t found on str type
  • No documentation for storage_api . I found the clear function by guessing

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.