Today, I tried to go through the tutorials to learn more about Holochain and Rust programming. Unfortunately, I got the following error message:
[nix-shell:~/holochain/core_concepts/cc_tuts]$ hc package
cargo build --release --target=wasm32-unknown-unknown --target-dir=…/target
Updating crates.io index
error: no matching package named hdk-proc-macros found
location searched: registry https://github.com/rust-lang/crates.io-index
required by package hello v0.1.0 (/home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code)
Error: Couldn’t traverse DNA in directory “/home/vagrant/holochain/core_concepts/cc_tuts”: command cargo build --release --target=wasm32-unknown-unknown --target-dir=…/target was not successful
Can somebody give me some hint or a solution for that? That would be great.
Best regards, Sven
I got the same error code. This is my vagrant-shell terminal output:
[nix-shell:~/holochain/core_concepts/cc_tuts]$ hc package
> cargo build --release --target=wasm32-unknown-unknown --target-dir=../target
Updating crates.io index
error: no matching package named `hdk-proc-macros` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
required by package `hello v0.1.0 (/home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code)`
Error: Couldn't traverse DNA in directory "/home/vagrant/holochain/core_concepts/cc_tuts": command cargo build --release --target=wasm32-unknown-unknown --target-dir=../target was not successful
[nix-shell:~/holochain/core_concepts/cc_tuts]$
I’m trying to reproduce this now with the same versions.
Those Cargo.toml files look wrong to me. It should be a git. “=0.0.34-alpha1” doesn’t make any sense. @thedavidmeister Is this a weird vagrant / windows thing or is something broken?
Thank you very much @freesig! It worked!!!
I opened the Cargo.toml file in the editor with vim Cargo.toml. Than typed “i” for insert and changed the line “hdk-proc-macros=…” in “hdk_proc_macros=…” and typed “:wq!” to save it. After that I tried “hc package” again…
And than it worked properly! Thanks for your effort!
So I will move on to study the tutorials to learn more about Holochain.
Sorry, now I´m running into the next problem. I could modify the lib.rs file and compiled it, so that I got the right result:
Created DNA package file at “/home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code/src/dist/src.dna.json”
DNA hash: QmXuPFimMCoYQrXqX9vr1vve8JtpQ7smfkw1LugqEhyWTr
But when I then run: “hc run -i http” I got the following error message:
[nix-shell:~/holochain/core_concepts/cc_tuts/zomes/hello/code/src]$ hc run -i http
Reading DNA from /home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code/src/dist/src.dna.json
conductor: boot_from_config
Reading DNA from /home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code/src/dist/src.dna.json
Reading DNA from /home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code/src/dist/src.dna.json
conductor: build_conductor_api instance_id=test-instance, config=Configuration { agents: [AgentConfiguration { id: “hc-run-agent”, name: “testAgent”, public_address: “HcScjN8wBwrn3tuyg89aab3a69xsIgdzmX5P9537BqQZ5A7TEZu7qCY4Xzzjhma”, keystore_file: “testAgent”, holo_remote_key: None, test_agent: Some(true) }], dnas: [DnaConfiguration { id: “hc-run-dna”, file: “/home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code/src/dist/src.dna.json”, hash: “QmXuPFimMCoYQrXqX9vr1vve8JtpQ7smfkw1LugqEhyWTr”, uuid: None }], instances: [InstanceConfiguration { id: “test-instance”, dna: “hc-run-dna”, agent: “hc-run-agent”, storage: Memory }], interfaces: [InterfaceConfiguration { id: “websocket-interface”, driver: Http { port: 8888 }, admin: true, instances: [InstanceReferenceConfiguration { id: “test-instance”, alias: None }] }], bridges: [], ui_bundles: [], ui_interfaces: [], logger: LoggerConfiguration { logger_level: “debug”, rules: LogRules { rules: [] }, state_dump: true }, network: None, persistence_dir: “”, signing_service_uri: None, encryption_service_uri: None, decryption_service_uri: None, dpki: None, signals: SignalConfig { trace: false, consistency: false }, passphrase_service: Cmd }
Reading DNA from /home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code/src/dist/src.dna.json
Reading DNA from /home/vagrant/holochain/core_concepts/cc_tuts/zomes/hello/code/src/dist/src.dna.json
Failed to load instance test-instance from storage: ErrorGeneric(“State could not be loaded due to NoneError”)
Initializing new chain…
Error: Error while trying to create instance “test-instance”: Holochain Instance Error: Attempting to initialize DNA with zero zomes!
Hello @freesig,
well, not intentionally. I just followed the tutorial description. But of course I want to go the most reasonable way…
What would be the best method in your opinion?
Thank you very much for your support!