"failed to load source" error in my_first_app tutorial

Forgive my noobiness, but I can’t get the my_first_app tutorial from the Quick Start instructions to work. Below is the error message I keep getting when I try running hc test. It happens whether I try to temporarily or permanently install the nix tools (on MacOS Mojave). What am I missing?

[nix-shell:~/my_first_app]$ hc test
Packaging files for testing to file: "/Users/Alex/my_first_app/dist/my_first_app.dna.json"
> cargo build --release --target=wasm32-unknown-unknown --target-dir=/Users/Alex/nix-holochain/my_zome/target
Updating git repository `https://github.com/holochain/holochain-rust`

error: failed to load source for a dependency on `hdk`

Caused by:

Unable to update https://github.com/holochain/holochain-rust?tag=v0.0.25-alpha1

Caused by:

failed to find tag `v0.0.25-alpha1`

Caused by:

reference 'refs/tags/v0.0.25-alpha1' not found; class=Reference (4); code=NotFound (-3)

Error: command cargo build --release --target=wasm32-unknown-unknown --target-dir=/Users/Alex/nix-holochain/my_zome/target was not successful
1 Like

Hi, @alexanderlynch we are in the process of updating the quick start.
There were problems with a few Holochain releases due to the removal of a tag.

Have you updated your Holochain version?
Also can you try these steps to see if you can resolve the issue?

  • [command] To update the Holochain tools, simply run the install command again:
    nix-env -f https://holochain.love -iA holochain.holochain holochain.hc

  • [command] Test that Holochain is working by running:
    [nix-shell: hc --version
    [nix-shell: holochain --version

  • You should see the latest Holochain version
    hc 0.0.28-alpha1
    holochain 0.0.28-alpha1

  • Continue with your first app:
    If you are using nix-shell, enter it before continuing.

The command to generate a new app is hc init.
Let’s create a new app called my_first_app.

  • [command] To do this with hc, run:
    hc init my_first_app

Note: If you get this Error: directory is not empty, it’s because the my_first_app directory already exists. To remove it, simply run rm -fr my_first_app.

The basic structure of a Holochain project is now in the “my_first_app” folder. Explore it in a file browser or text editor.

This would be a good place to link to a description of what is generated.

Once you have a feel for what was created, try generating a “zome.”

A “zome” is what we call the source code of a Holochain app.

First, make sure your terminal is working from the my_first_app folder.

  • [command] Run the following to move to the apps directory:
    cd my_first_app

  • [command] To generate a zome, run the following command:
    hc generate zomes/my_zome

This will add a Rust project into the zomes/my_zome sub-folder.

You can now open the generated code in a text editor and start building!
The generated zomes come with a simple automated test suite. The tests can be found in my_first_app/test/index.js.

  • [command] The tests can be run with the test command:
    hc test
1 Like