Skip to content

Commit

Permalink
added error fix for Cargo.lock version (#680)
Browse files Browse the repository at this point in the history
* added error fix for Cargo.lock version

* Update docs/intro/installation.md

* Update docs/intro/installation.md

* fix: typo

* feat: added github issue

---------

Co-authored-by: Nick Frostbutter <[email protected]>
  • Loading branch information
heyAyushh and nickfrosty authored Jan 3, 2025
1 parent 0b7ba37 commit c85d7de
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ i18n


# code-import
.turbo
code/node_modules
code/package-lock.json
code/yarn.lock
Expand Down
22 changes: 20 additions & 2 deletions docs/intro/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,10 @@ You should the following output:
</AccordionItem>
</Accordion>

When running `anchor build`, if you encounter `error: not a directory` similar
following:
When running `anchor build`, if you encounter similar errors following:

<Accordion>
<AccordionItem title="error: not a directory">

```
error: not a directory: '.../solana-release/bin/sdk/sbf/dependencies/platform-tools/rust/lib'
Expand All @@ -463,6 +465,22 @@ cargo build-sbf --force-tools-install
rm -rf ~/.cache/solana/*
```

</AccordionItem>

<AccordionItem title="lock file version 4 requires `-Znext-lockfile-bump">
You can fix this by changing the version field of `Cargo.lock` file

```
version = 3
```

See [this issue](https://github.com/coral-xyz/anchor/issues/3392) for more
information.

</AccordionItem>

</Accordion>

After applying either solution, attempt to run `anchor build` again.

If you are on Linux or WSL and encounter the following errors when running
Expand Down

0 comments on commit c85d7de

Please sign in to comment.