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

Unable to run 'npm run start' cmd while creating custom app

username1
Participant

Hi,

I am unable to run 'npm run start' cmd while creating custom app, here is the error that I am getting, please could you help me in resolving this error

 

C:\Users\xxxxx\tansre-3>npm run start
npm ERR! Missing script: "start"
npm ERR!
npm ERR! Did you mean one of these?
npm ERR! npm star # Mark your favorite packages
npm ERR! npm stars # View packages marked as favorites
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run

npm ERR! A complete log of this run can be found in: C:\Users\xxxxx\AppData\Local\npm-cache\_logs\2024-11-05T21_38_41_992Z-debug-0.log

5 REPLIES 5

Mulks
Visitor

Check to make sure you have the correct package.json file. There will be a scripts block with all the npm commands available to the app.

Example:

"scripts": {
    "build": "dt-app build --prod",
    "start": "dt-app dev",
    "generate:function": "dt-app generate function",
    "generate:action": "dt-app generate action",
    "uninstall": "dt-app uninstall",
    "deploy": "dt-app deploy",
    "update": "dt-app update",
    "info": "dt-app info",
    "help": "dt-app help",
    "lint": "eslint ."
  }

Taylor-Sanchez
Dynatrace Mentor
Dynatrace Mentor

You may simply be missing the `start` script that should be located in in the `package.json` file. I would verify that this script actually exists before running. 

Dynatrace ACE Services Consultant

username1
Participant

Many thanks for your response Mulks and Taylor, I am able to start the development server, but now ending-up with the following error

 

C:\Users\xxxx\tansre-3>npm run start

> start
> dt-app dev


Warning ──────────────────────────────────────────────────────────────────────────────────

Failed to retrieve user details. App functions will use placeholder data.

──────────────────────────────────────────────────────────────────────────────────────────

DT-APP: Started local development server
> <no file> - Error: Cannot find tsconfig file "tsconfig.json"

> <no file> - Error: Could not resolve "C:\\Users\\xxxx\\tansre-3\\src\\main.tsx"

× Authenticating...
Error: SSO-URL for 'https://{environmentid}.apps.dynatrace.com' could not be processed.
self-signed certificate in certificate chain
If you need further assistance visit the connectivity troubleshooting guide here: https://dt-url.net/c4jp0s12

 

Looks like I am still missing something. Please advise

Hi @username1,
It is a better approach to install the Dynatrace Apps extension on VSCode. Just search in VScode Extensions for "Dynatrace Apps".

zaidbashir_0-1736316809589.png

Once you create the project, it will show you "[Dynatrace] Not Authenticated".

Not AuthenticatedNot Authenticated

Just Click on it and it will show you dialog like the below to authenticate your self with the dynatrace account.

zaidbashir_1-1736317052259.png

If you are still facing problem, try to look into your package.json file for "scripts" parameter. Below you can find the "scripts" field.

  "scripts": {
    "build": "dt-app build --prod",
    "start": "dt-app dev",
    "generate:function": "dt-app generate function",
    "generate:action": "dt-app generate action",
    "uninstall": "dt-app uninstall",
    "deploy": "dt-app deploy",
    "update": "dt-app update",
    "info": "dt-app info",
    "help": "dt-app help",
    "lint": "eslint ."
  }


Thanks

zaid-bashir
Participant

Hi @username1 

First of all, try to create project in a disk different from "C" disk. If "C" is your only available disk, then try to create one folder like "src" under "C" drive and then create a project under "C/src/" because sometimes permissions also create problem.


After you created your project using "npx dt-app@latest create" and you followed the instructions given there. Try to point out to the same directory i mean be in the root directory of the project and then run the command like:

"npm run start".

If you face some issues related to authentication while running the app, here i have given you answer for that.
https://community.dynatrace.com/t5/Developer-Q-A-Forum/Unable-to-run-npm-run-start-cmd-while-creatin...


Featured Posts