Creation of a payment customization function - Wasm compilation error

stephenstephen
Shopify Partner
5 0 4

I would like to take a first step with creating Javascript payment customizations, but I'm stuck on step 8

https://shopify.dev/docs/apps/checkout/payment-customizations/getting-started

When deploying the JavaScript function with yarn deploy, I get a compilation error

 

Capture d’écran du 2023-06-06 22-39-44.png

 

Node Version 18.15.0

Shopify Cli Version 3.44.1

Thanks.



Replies 2 (2)

Nick_Wesselman
Shopify Staff
167 41 64

Can you try running this with the --verbose flag? Or perhaps do a 'npm run build' from the extension folder to see if there are any build errors? Does the wasm exist in the extension 'dist' folder?

Lastly you might try updating to the latest CLI -- 'npm run shopify upgrade'

Cheers,

Nick

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

luke_anderson
Shopify Partner
1 0 1

We experienced this exact issue when setting up a Bitbucket pipeline to deploy our functions.

 

Going through the verbose logging we could see javy was being called using npm exec, however there was no wasm output generated in the dist directory. Logging also showed no errors except for an error similar to the original post saying there was no wasm.

 

Checking the javy repository, it turns out there is a requirement for glibc 2.31 or greater for running the official javy binaries on linux. Our pipeline was running in a docker container based on alpine with gcompat installed. We switched this to a debian based container which resolved our issue.