sui icon indicating copy to clipboard operation
sui copied to clipboard

Error [E01003] struct NFT { Invalid struct declaration. Internal struct declarations are not yet supported

Open UXSciGuy opened this issue 10 months ago • 3 comments

When running "sui move build" with the following code in my .move file:

/// Module: test_nft
module test_nft::test_nft {
    use sui::url::{Self, Url};
    use std::string;
    use sui::object::{Self, ID, UID};
    use sui::event;
    use sui::transfer;
    use sui::tx_context::{Self, TxContext};

    /// An example NFT that can be minted by anybody
    struct DevNetNFT has key, store {
        id: UID,
        /// Name for the token
        name: string::String,
        /// Description of the token
        description: string::String,
        /// URL for the token
        url: Url,
    }
}

I get the following error message:

error[E01003]: invalid modifier ┌─ sources/simba_nft.move:4:5 │ 4 │ struct NFT { │ ^^^^^^ Invalid struct declaration. Internal struct declarations are not yet supported

I know that internal struct declarations are allowed. What is the issue? I've setup the sui environment per the documentation. Can some one help?

UXSciGuy avatar Apr 07 '24 00:04 UXSciGuy

Your issue might be related to https://github.com/MystenLabs/sui/issues/17087

mshakeg avatar Apr 15 '24 12:04 mshakeg

I am getting the same issue/warning when running the VS Code Studio language support plugin.

gordonkoehn avatar May 06 '24 13:05 gordonkoehn

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 06 '24 01:07 github-actions[bot]

@UXSciGuy is this issue still ongoing?

stefan-mysten avatar Jul 22 '24 20:07 stefan-mysten