Hi. I’ve been following the ‘Build a discount experience’ tutorial but have hit a few early issues:
- When installing cargo-wasi, I get the warning:
warning: be sure to add [...] to your PATH to be able to run the installed binaries
I think I’ve done that but I thought it was worth mentioning, in case it’s related to the problems below.
- If I try using Javascript as the language the typegen function doesn’t work, with terminal reporting:
Missing script: “typegen”
- If I proceed instead in Rust, when I get to the deploy step (1.8) it fails:
── external error
Error coming from cargo wasi build --release
Command failed with exit code 101: cargo wasi build --release
Compiling product-discount v1.0.0 ([…]**)
error: expected item, found import
→ src/main.rs:2:1
|
2 | import { DiscountApplicationStrategy } from “../generated/api”;
| ^^^^^^ expected item
error: could not compile product-discount due to previous error
Any help or direction on the above would be greatly appreciated. (I have previously done the ‘Create an app’ tutotial (https://shopify.dev/docs/apps/getting-started/create) without any of the above issues.)
Thanks in advance.