05 Nov 2024 09:48 PM - last edited on 12 Nov 2024 10:49 AM by MaciejNeumann
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
Solved! Go to Solution.
05 Nov 2024 10:17 PM
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:
05 Nov 2024 11:08 PM
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.
06 Nov 2024 05:26 AM
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
08 Jan 2025 06:22 AM
Hi @username1,
It is a better approach to install the Dynatrace Apps extension on VSCode. Just search in VScode Extensions for "Dynatrace Apps".
Once you create the project, it will show you "[Dynatrace] Not Authenticated".
Just Click on it and it will show you dialog like the below to authenticate your self with the dynatrace account.
If you are still facing problem, try to look into your package.json file for "scripts" parameter. Below you can find the "scripts" field.
Thanks
08 Jan 2025 06:41 AM
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...