holochain / holochain-rust

DEPRECATED. The Holochain framework implemented in rust with a redux style internal state-model.
GNU General Public License v3.0
1.12k stars 267 forks source link

When running tests -> host module doesn't export function with name hc_crypto #1670

Open GildedHonour opened 5 years ago

GildedHonour commented 5 years ago

When running tests, I get this error:

internal error in Neon module: Failed to instantiate module: Function("host module doesn\'t export function with name hc_crypto")
$ hc --version
hc 0.0.27-alpha1

Arch Linux

zippy commented 5 years ago

Hi there. This is most likely happening because you haven't updated your Cargo.toml files in your dna to match the latest alpha. Tell me if updating that resolves your problem.

GildedHonour commented 5 years ago

No, that didn't


[dependencies]
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
boolinator = "2.4"
hdk = { git = "https://github.com/holochain/holochain-rust", tag = "0.0.27-alpha1" }
holochain_wasm_utils = { git = "https://github.com/holochain/holochain-rust", tag = "0.0.27-alpha1" }
holochain_json_derive = "0.0.17"

[lib]
path = "src/lib.rs"
crate-type = ["cdylib"]
pospi commented 5 years ago

I've noticed this also happens for me when I forget to run the test command from within my Nix environment. I think it's because I have Rust installed natively in my system and there are some mismatched dependencies between it and the version provided by Nix.