Custom Solutions Spotlight
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Migration from dt-app 0.148.1 to dt-app 1.0.2 error (new project structure)

Evan1
Visitor

Hello,

I've recently made the dependencies update of my custom app, with in it the new major version of dt-app. In the new version, there is a new project structure files, so I followed the migration guide of the wiki : https://developer.dynatrace.com/quickstart/app-toolkit/#migrating-from-v0x-to-v1x

When I try to lunch my development app, i've got the error that I have the wrong files structure, but I don't see the problem. I tried to add empty `documents` and `actions` folders, or add a README.md in it but I still have this error : 

✖ Building ui...

              Invalid project structure detected

              Your project uses an outdated file structure that is not supported in dt-app v1.0.
              To ensure compatibility and avoid build issues, please update your project structure.

              Required Changes:

              1. Configure sourceRoot in app.config.json:
                • Set "build.sourceRoot" to your desired source directory (default: "./")
                • Example: "build": { "sourceRoot": "src" }

              2. Organize your code using the standardized structure:
                <sourceRoot>/
                ├── ui/                     ← UI components and main.tsx
                │   ├── main.tsx
                │   └── tsconfig.json
                ├── api/                    ← App functions (*.function.ts)
                ├── actions/                ← Workflow actions (*.action.ts)
                ├── settings/               ← Settings widgets and schemas
                └── documents/              ← Document files

              Thank you for your support!

Evan1_0-1760363058212.png

 

Thanks for your help by advance,

Kind regards,

Evan

 

2 REPLIES 2

Evan1
Visitor

PS : I've also tried to add the suggested build.sourceRoot option in my app.config.json but doesn't work

"build": {
    "sourceRoot": "./"
  }

 

Evan1
Visitor

Hi there,

the solution to this problem is to remove every single "src" in your imports in the whole project. If you have an error with a src/ import in, it would return this error (instead of returning import error I guess)

Featured Posts