# Your First Sui dApp - error\[E02004\] when building the package

**URL:** <https://forums.sui.io/t/your-first-sui-dapp-error-e02004-when-building-the-package/45957>\
**Category:** Technical Support\
**Created:** [August 6, 2024, 3:49pm UTC](https://forums.sui.io/t/your-first-sui-dapp-error-e02004-when-building-the-package/45957 "2024-08-06T15:49:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xpedite](https://avatars.discourse-cdn.com/v4/letter/x/f4b2a3/32.png) [@Xpedite](https://forums.sui.io/u/Xpedite)\
**Post date:** [August 6, 2024, 3:49pm UTC](https://forums.sui.io/t/your-first-sui-dapp-error-e02004-when-building-the-package/45957/1 "2024-08-06T15:49:20Z")

</div>

Hi there,  
I’m new to Sui and I’m getting my feet wet with some basic tutorials.

Some info:

- version: sui 1.27.0-e5f080922d56-dirty
- I’m using testnet
- Windows

I followed the following tutorial: /guides/developer/first-app but I’m running into some issues when building the package.

I get the following error:

```auto
sui move build
FETCHING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
INCLUDING DEPENDENCY Sui
INCLUDING DEPENDENCY MoveStdlib
BUILDING my_first_package
error[E02004]: invalid 'module' declaration
    ┌─ C:\Users\me/.move\https ___github_com_MystenLabs_sui_git_framework__ testnet\crates\sui-framework\packages\move-stdlib\sources\vector.move:241:74
    │
241 │ public macro fun find_index<$T>($v: &vector<$T>, $f: |&$T| -> bool): Option<u64> {
    │ ^^^^^^^^^^^ 'std::option' uses 'std::vector'. This 'use' relationship creates a dependency cycle.
    │
    ┌─ C:\Users\me/.move\https ___github_com_MystenLabs_sui_git_framework__ testnet\crates\sui-framework\packages\move-stdlib\sources\option.move:49:9
    │
 49 │ &t.vec[0]
    │ --------- 'std::vector' uses 'std::option'

Failed to build Move modules: Compilation error. 

```

The tutorial mentions:

> If the build fails, you can use the verbose error messaging in output to troubleshoot and resolve root issues.

However, I can’t seem to figure out how to do that 🙂

Please mind I’m just an amateur 😉  
I looked over here on the forum but couldn’t find anything related.

Any help would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![\_1729throw](https://avatars.discourse-cdn.com/v4/letter/_/edb3f5/32.png) [@\_1729throw](https://forums.sui.io/u/_1729throw)\
**Post date:** [August 8, 2024, 7:25pm UTC](https://forums.sui.io/t/your-first-sui-dapp-error-e02004-when-building-the-package/45957/3 "2024-08-08T19:25:34Z")

</div>

I’m having the same error.

Its like “hello, world” official tutorial (“Your first SUI dAPP”) , and is expected to work.

Version: sui 1.29.2-homebrew  
Platform : Mac OS 17

---

<div class="post-metadata">

**Author:** ![\_1729throw](https://avatars.discourse-cdn.com/v4/letter/_/edb3f5/32.png) [@\_1729throw](https://forums.sui.io/u/_1729throw)\
**Post date:** [August 10, 2024, 2:10am UTC](https://forums.sui.io/t/your-first-sui-dapp-error-e02004-when-building-the-package/45957/4 "2024-08-10T02:10:20Z")

</div>

Issue went away , after I uninstalled and installed ui.  
“sui move build” worked.

---

<div class="post-metadata">

**Author:** ![pmahanty](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@pmahanty](https://forums.sui.io/u/pmahanty)\
**Post date:** [August 13, 2024, 1:39am UTC](https://forums.sui.io/t/your-first-sui-dapp-error-e02004-when-building-the-package/45957/5 "2024-08-13T01:39:07Z")

</div>

I also encountered the same error. Here is what I did to resolve. It was on version 1.29 which got upgraded to 1.30. You have to update SUI using the following command:

```auto
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui

This will take approximately 20-30 minutes to upgrade. 
Check the sui version after installation - it will be sui 1.30.3-d355d9f2f8ef.
Check for which sui. This path should be there in the $PATH variable. 

Now run sui move build 

```

---

<div class="post-metadata">

**Author:** ![stefan](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@stefan](https://forums.sui.io/u/stefan)\
**Post date:** [August 14, 2024, 12:50am UTC](https://forums.sui.io/t/your-first-sui-dapp-error-e02004-when-building-the-package/45957/6 "2024-08-14T00:50:39Z")

</div>

If you are running Windows / Linux / MacOS x86\_64 or MacOS ARM, just download the binaries [Releases · MystenLabs/sui · GitHub](https://github.com/MystenLabs/sui/releases) instead of building from source.
