Use rust to write functions and report errors when deploying the shopify app.

ymq
Shopify Partner
27 0 18

rustc 1.78.0 (9b00956e5 2024-04-29)

cargo 1.78.0 (54d8815d0 2024-03-26)

cargo-wasi 0.1.28 (e811d4889b 2023-06-12)

Node.js v20.13.0.

npm 10.5.2

 

The above is my environment.

I copied exactly the code from https://shopify.dev/docs/apps/selling-strategies/discounts/experience/getting-started.

Then run shopify app deploy.

But got this error:
Running validation...
Error: The function extension "rust-test" hasn't compiled the wasm in the expected path: C:/Users/Windows/Desktop/extension/cart/extensions/rust-test/target/wasm32-wasi/ release/rust-test.wasm

Reply 1 (1)

Nick_Wesselman
Shopify Staff
156 39 59

Was there a build error? Is there a file at the specified path? You might double check the expected path in your extension toml.

 

What happens if you `shopify app function build` from the extension folder?

Nick Wesselman | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog