# Error deploying Azle

**URL:** <https://forum.dfinity.org/t/error-deploying-azle/25255>\
**Category:** Getting Started\
**Tags:** Discussing\
**Created:** [December 4, 2023, 12:52pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255 "2023-12-04T12:52:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![morotijani](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/morotijani/32/14163_2.png) [@morotijani](https://forum.dfinity.org/u/morotijani)\
**Post date:** [December 4, 2023, 12:52pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/1 "2023-12-04T12:52:21Z")

</div>

am using windows os and all installation and dependencies have been followed correctly  
dfx 0.15.1 or dfx 0.15.2 nethier do work.

anytime i run “dfx deploy” i get the errors below;

mijma@DESKTOP-NS66FFM:~/azle\_hello\_world$ dfx deploy  
Deploying all canisters.  
All canisters have already been created.  
Building canisters…  
Executing ‘npx azle azle\_hello\_world’

Building canister azle\_hello\_world

Initial build takes a few minutes. Don’t panic. Subsequent builds will be faster.

[1/4] 🔬 Performing initial research…  
[2/4] 🛠 Commencing development…  
[3/4] 🖥 Deploying…  
[4/4] 🚀 Launching…  
Error: Command failed: cd .azle/azle\_hello\_world && /home/mijma/.config/azle/rust/1.73.0/bin/cargo build --target wasm32-wasi --manifest-path canister/Cargo.toml --release  
error: rustup could not choose a version of cargo to run, because one wasn’t specified explicitly, and no default is configured.  
help: run ‘rustup default stable’ to download the latest stable release of Rust and set it as your default toolchain.

```
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at compileRustCode (/home/mijma/azle_hello_world/node_modules/azle/src/compiler/compile_rust_code.ts:14:13)
at /home/mijma/azle_hello_world/node_modules/azle/src/compiler/index.ts:135:28
at time (/home/mijma/azle_hello_world/node_modules/azle/src/compiler/utils/time.ts:10:26)
at azle (/home/mijma/azle_hello_world/node_modules/azle/src/compiler/index.ts:55:15)
at Object.<anonymous> (/home/mijma/azle_hello_world/node_modules/azle/src/compiler/index.ts:35:1)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module.m._compile (/home/mijma/azle_hello_world/node_modules/ts-node/src/index.ts:1365:23) {

```

status: 1,  
signal: null,  
output: [  
null,  
Buffer(0) [Uint8Array] ,  
Buffer(247) [Uint8Array] [  
101, 114, 114, 111, 114, 58, 32, 114, 117, 115, 116, 117,  
112, 32, 99, 111, 117, 108, 100, 32, 110, 111, 116, 32,  
99, 104, 111, 111, 115, 101, 32, 97, 32, 118, 101, 114,  
115, 105, 111, 110, 32, 111, 102, 32, 99, 97, 114, 103,  
111, 32, 116, 111, 32, 114, 117, 110, 44, 32, 98, 101,  
99, 97, 117, 115, 101, 32, 111, 110, 101, 32, 119, 97,  
115, 110, 39, 116, 32, 115, 112, 101, 99, 105, 102, 105,  
101, 100, 32, 101, 120, 112, 108, 105, 99, 105, 116, 108,  
121, 44, 32, 97,  
… 147 more items  
]  
],  
pid: 17947,  
stdout: Buffer(0) [Uint8Array] ,  
stderr: Buffer(247) [Uint8Array] [  
101, 114, 114, 111, 114, 58, 32, 114, 117, 115, 116, 117,  
112, 32, 99, 111, 117, 108, 100, 32, 110, 111, 116, 32,  
99, 104, 111, 111, 115, 101, 32, 97, 32, 118, 101, 114,  
115, 105, 111, 110, 32, 111, 102, 32, 99, 97, 114, 103,  
111, 32, 116, 111, 32, 114, 117, 110, 44, 32, 98, 101,  
99, 97, 117, 115, 101, 32, 111, 110, 101, 32, 119, 97,  
115, 110, 39, 116, 32, 115, 112, 101, 99, 105, 102, 105,  
101, 100, 32, 101, 120, 112, 108, 105, 99, 105, 116, 108,  
121, 44, 32, 97,  
… 147 more items  
]  
}  
Error: Failed while trying to deploy canisters.  
Caused by: Failed while trying to deploy canisters.  
Failed to build all canisters.  
Failed while trying to build all canisters.  
The build step failed for canister ‘by6od-j4aaa-aaaaa-qaadq-cai’ (azle\_hello\_world) with an embedded error: Failed to build custom canister azle\_hello\_world.: Failed to run npx azle azle\_hello\_world.: The custom tool failed.  
mijma@DESKTOP-NS66FFM:~/azle\_hello\_world$

---

<div class="post-metadata">

**Author:** ![NathanosDev](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nathanosdev/32/7204_2.png) [@NathanosDev](https://forum.dfinity.org/u/NathanosDev)\
**Post date:** [December 4, 2023, 12:59pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/2 "2023-12-04T12:59:47Z")

</div>

There’s a help message in your logs:

```auto
error: rustup could not choose a version of cargo to run, because one wasn’t specified explicitly, and no default is configured.
help: run ‘rustup default stable’ to download the latest stable release of Rust and set it as your default toolchain.

```

Did you try running `rustup default stable`?

---

<div class="post-metadata">

**Author:** ![morotijani](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/morotijani/32/14163_2.png) [@morotijani](https://forum.dfinity.org/u/morotijani)\
**Post date:** [December 4, 2023, 1:08pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/4 "2023-12-04T13:08:16Z")

</div>

During the installation process, there was no rust setup procedure shown. so i do not know hoe to set it. can you help me with the process or the syntax to use in the terminal?

---

<div class="post-metadata">

**Author:** ![NathanosDev](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nathanosdev/32/7204_2.png) [@NathanosDev](https://forum.dfinity.org/u/NathanosDev)\
**Post date:** [December 4, 2023, 1:21pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/5 "2023-12-04T13:21:18Z")

</div>

```auto
cd .azle/azle_hello_world && /home/mijma/.config/azle/rust/1.73.0/bin/cargo build --target wasm32-wasi --manifest-path canister/Cargo.toml --release

```

I see that Azle is trying to use a bundled version of Rust, so maybe you’re not meant to have it installed.

Sorry, I don’t have much experience with Azle so I’m not 100% sure what is the right way to do this, but if you install Rust [according to the official instructions](https://www.rust-lang.org/tools/install) then it should work. At least it does for me.

@lastmjs is this error expected without having Rust installed on the host OS?

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [December 4, 2023, 5:19pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/6 "2023-12-04T17:19:21Z")

</div>

@morotijani Azle is designed to abstract all of the Rust stuff away, so trying to manually install it is most likely not going to work unless you’re aware of the internal details.

Something probably just happened during your installation. Please follow these instructions and can back here if you need more help: [Deployment - The Azle Book](https://demergent-labs.github.io/azle/deployment.html#common-deployment-issues)

---

<div class="post-metadata">

**Author:** ![iamenochchirima](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/iamenochchirima/32/21673_2.png) [@iamenochchirima](https://forum.dfinity.org/u/iamenochchirima)\
**Post date:** [December 7, 2023, 11:19am UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/7 "2023-12-07T11:19:49Z")

</div>

What could be the cause of this error?

 ![WhatsApp Image 2023-12-07 at 12.18.29 PM](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/c/c1d7c4a580970114f1f096c39a6406b74949fea5.jpeg)

It’s running for the first time on this computer, All the tools have been installed according to the [installation guide](https://demergent-labs.github.io/azle/installation.html). The dependancies installed as well. But there is this weird typescript error on all the functions, it’s saying “Expected 0 args, got 3” on all the functions. What is missing?

---

<div class="post-metadata">

**Author:** ![divin3circle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/divin3circle/32/12149_2.png) [@divin3circle](https://forum.dfinity.org/u/divin3circle)\
**Post date:** [October 22, 2024, 9:17am UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/8 "2024-10-22T09:17:55Z")

</div>

Hi, I have been getting this error when setting up my azle projects using `dfx new projectName` for weeks now. When i try to deploy even without making a change in the codebase i run into this error:

> > dfx deploy  
> > Deploying all canisters.  
> > All canisters have already been created.  
> > Building canisters…  
> > Executing ‘npx azle app\_backend’

Building canister app\_backend  
Error: Command failed: cd .azle/app\_backend && /Users/sylusabel/.config/azle/rust/1.73.0/bin/cargo build --target wasm32-wasi --manifest-path canister/Cargo.toml --release  
Updating [crates.io](http://crates.io) index  
Updating git repository `https://github.com/demergent-labs/ic-wasi-polyfill`  
Updating git repository `https://github.com/ulan/javy.git`  
Updating git repository `https://github.com/wasm-forge/stable-fs`  
error: failed to select a version for the requirement `futures-util = "=0.3.27"`  
candidate versions found which didn’t match: 0.3.31, 0.2.1, 0.2.0  
location searched: [crates.io](http://crates.io) index  
required by package `quickjs-wasm-sys v1.0.0 (https://github.com/ulan/javy.git?rev=fdf12ce4fd5636417cd63e1f6296aa79196434a7#fdf12ce4)`  
… which satisfies git dependency `quickjs-wasm-sys` of package `quickjs-wasm-rs v1.0.0 (https://github.com/ulan/javy.git?rev=fdf12ce4fd5636417cd63e1f6296aa79196434a7#fdf12ce4)`  
… which satisfies git dependency `quickjs-wasm-rs` of package `canister v0.0.0 (/Users/sylusabel/Desktop/development/web3/app/.azle/app_backend/canister)`  
perhaps a crate was updated and forgotten to be re-vendored?

```
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at compileRustCode (/Users/sylusabel/Desktop/development/web3/app/node_modules/azle/src/compiler/compile_rust_code.ts:14:13)
at /Users/sylusabel/Desktop/development/web3/app/node_modules/azle/src/compiler/index.ts:135:28
at time (/Users/sylusabel/Desktop/development/web3/app/node_modules/azle/src/compiler/utils/time.ts:10:26)
at azle (/Users/sylusabel/Desktop/development/web3/app/node_modules/azle/src/compiler/index.ts:55:15)
at Object.<anonymous> (/Users/sylusabel/Desktop/development/web3/app/node_modules/azle/src/compiler/index.ts:35:1)
at Module._compile (node:internal/modules/cjs/loader:1469:14) {

```

status: 101,  
signal: null,  
output: [  
null,  
Buffer(0) [Uint8Array] ,  
Buffer(965) [Uint8Array] [  
32, 32, 32, 32, 85, 112, 100, 97, 116, 105, 110, 103,  
32, 99, 114, 97, 116, 101, 115, 46, 105, 111, 32, 105,  
110, 100, 101, 120, 10, 32, 32, 32, 32, 85, 112, 100,  
97, 116, 105, 110, 103, 32, 103, 105, 116, 32, 114, 101,  
112, 111, 115, 105, 116, 111, 114, 121, 32, 96, 104, 116,  
116, 112, 115, 58, 47, 47, 103, 105, 116, 104, 117, 98,  
46, 99, 111, 109, 47, 100, 101, 109, 101, 114, 103, 101,  
110, 116, 45, 108, 97, 98, 115, 47, 105, 99, 45, 119,  
97, 115, 105, 45,  
… 865 more items  
]  
],  
pid: 66115,  
stdout: Buffer(0) [Uint8Array] ,  
stderr: Buffer(965) [Uint8Array] [  
32, 32, 32, 32, 85, 112, 100, 97, 116, 105, 110, 103,  
32, 99, 114, 97, 116, 101, 115, 46, 105, 111, 32, 105,  
110, 100, 101, 120, 10, 32, 32, 32, 32, 85, 112, 100,  
97, 116, 105, 110, 103, 32, 103, 105, 116, 32, 114, 101,  
112, 111, 115, 105, 116, 111, 114, 121, 32, 96, 104, 116,  
116, 112, 115, 58, 47, 47, 103, 105, 116, 104, 117, 98,  
46, 99, 111, 109, 47, 100, 101, 109, 101, 114, 103, 101,  
110, 116, 45, 108, 97, 98, 115, 47, 105, 99, 45, 119,  
97, 115, 105, 45,  
… 865 more items  
]  
}  
Building frontend…  
Error: Failed while trying to deploy canisters.  
Caused by: Failed to build all canisters.  
Caused by: Failed while trying to build all canisters.  
Caused by: The build step failed for canister ‘be2us-64aaa-aaaaa-qaabq-cai’ (app\_backend)  
Caused by: Failed to build custom canister app\_backend.  
Caused by: Failed to run npx azle app\_backend.  
Caused by: The custom tool failed.

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [October 22, 2024, 6:35pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/9 "2024-10-22T18:35:46Z")

</div>

I would recommend you not use `dfx new` when creating an Azle project, it’s currently out of date. Just use The Azle Book documentation: [The Azle Book (Beta) - The Azle Book](https://demergent-labs.github.io/azle/)

---

<div class="post-metadata">

**Author:** ![divin3circle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/divin3circle/32/12149_2.png) [@divin3circle](https://forum.dfinity.org/u/divin3circle)\
**Post date:** [October 22, 2024, 8:33pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/10 "2024-10-22T20:33:25Z")

</div>

Hi thanks for this, But i was already running a project using azle for backend and react as my frontend do I have to redo? Or is there an alternative. Thanks once again.

---

<div class="post-metadata">

**Author:** ![divin3circle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/divin3circle/32/12149_2.png) [@divin3circle](https://forum.dfinity.org/u/divin3circle)\
**Post date:** [October 24, 2024, 5:37am UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/11 "2024-10-24T05:37:30Z")

</div>

idk but is running _dfx azle project\_name_ still supported? cause i keep getting this error: ❯ dfx deploy  
Deploying all canisters.  
All canisters have already been created.  
Building canisters…  
Executing ‘npx azle app\_backend’  
/Users/sylusabel/Desktop/development/web3/app/node\_modules/azle/src/build/index.ts:77  
throw new Error(  
^

Error: Azle: Invalid command found when running azle. Running azle app\_backend is not valid

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [October 30, 2024, 2:04pm UTC](https://forum.dfinity.org/t/error-deploying-azle/25255/12 "2024-10-30T14:04:04Z")

</div>

In the latest version that is not supported. Please see The Azle Book and the examples in the repo:

[https://demergent-labs.github.io/azle/](https://demergent-labs.github.io/azle/)

> **[azle/tests/end\_to\_end/candid\_rpc/class\_syntax at main · demergent-labs/azle](https://github.com/demergent-labs/azle/tree/main/tests/end_to_end/candid_rpc/class_syntax)**
>
> A WebAssembly runtime for TypeScript and JavaScript on ICP - demergent-labs/azle

There are many many examples and a good amount of documentation, please make sure your project looks like those examples with that documentation.

I suggest making your project using npx azle new [project name].
