10 Apr 2025 01:43 PM
Hi devs!
We are trying to download and set up the Dynatrace App Toolkit. We execute the following command to initialize a new app, after downloading the app templates in the target folder:
npx dt-app@latest create --environment-url https://{environmentid}.apps.dynatrace.com --template-dir .\dt-app-templates-main\templates\default
And the output is the following:
Error: Installing the dependencies failed.
Please try to run npm install
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @dynatrace-sdk/client-query@^1.20.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
We've noticed that, in the package.json file of the default template, some npm packages require versions that are not found.
For instance, consider the dependecy: https://github.com/Dynatrace/dt-app-templates/blob/402fb136c063c3e0ee349088fa472d6a159a4d77/template...
"@dynatrace-sdk/client-query": "^1.20.0",
On www.npmjs.com, we see that the latest version is 1.18.1 : https://www.npmjs.com/package/@dynatrace-sdk/client-query
Other dependencies for which the required version is not found on npmjs are
"@dynatrace/strato-components": "^1.4.0",
"@dynatrace/strato-components-preview": "^1.4.0",
"@dynatrace/strato-icons": "^1.3.0",
However, after modifying the package.json file with versions that matches the one found on npmjs.com, some errors about deprecated dependencies are prompted:
Error: Installing the dependencies failed.
Please try to run npm install
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm WARN deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
npm ERR! code EEXIST
npm ERR! syscall copyfile
npm ERR! path C:\Users\c330613\AppData\Local\npm-cache\_cacache\tmp\d860fc81
npm ERR! dest C:\Users\c330613\AppData\Local\npm-cache\_cacache\content-v2\sha512\25\0e\53b8c8b8e4ec22e3f048300241a12428389bb5da83a4fe0003aa57142fd24474707cbf28d44acc6a78d5e79971e360a322d96718b5ecc610486a508fc4da
npm ERR! errno -4082
npm ERR! EBUSY: resource busy or locked, copyfile 'C:\Users\c330613\AppData\Local\npm-cache\_cacache\tmp\d860fc81' -> 'C:\Users\c330613\AppData\Local\npm-cache\_cacache\content-v2\sha512\25\0e\53b8c8b8e4ec22e3f048300241a12428389bb5da83a4fe0003aa57142fd24474707cbf28d44acc6a78d5e79971e360a322d96718b5ecc610486a508fc4da'
npm ERR! File exists: C:\Users\c330613\AppData\Local\npm-cache\_cacache\content-v2\sha512\25\0e\53b8c8b8e4ec22e3f048300241a12428389bb5da83a4fe0003aa57142fd24474707cbf28d44acc6a78d5e79971e360a322d96718b5ecc610486a508fc4da
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
Could you please help us with this situation? Which configuration should be applied for installing the correct packages (and versions) ? Are there other repositories?
Other informations:
node version: v20.2.0
npm ping result:
npm notice PING https://registry.npmjs.org/
npm notice PONG 416ms
Thank you
Giovanni
Solved! Go to Solution.
15 Apr 2025 12:04 PM - edited 15 Apr 2025 12:15 PM
Hello! Thanks for reaching out!
Each version of dt-app uses a specific GitHub commit to ensure compatibility between the dt-app CLI and the templates.
The current public dt-app version is 0.139.1, which corresponds to this commit.
You can find a list of all tagged commits here.
Once your app is created or dependencies are adjusted, you can use the dt-app update command to ensure you're up to date and all automatic migrations are executed.
Considering the above, I would suggest doing the following:
If you're trying to create an internal app template, please always base it on the commit that is tagged with the publicly available version and use `npm dt-app update` to keep it up-to-date
If you have any additional questions or problems, just let me know!
17 Apr 2025 01:12 PM
Thank you! This indeed resolved our issue, and we installed the app correctly!
One more thing if I may ask: we completed all the checks in the troubleshooting connectivity page of the documentation: Troubleshoot connectivity | Dynatrace Developer , so all the connection tests work as expected, both for connectivity regarding our machine and for node.js.
However, when we start the app, the SSO-URL seems to be not reachable.
We set up also NODE_EXTRA_CA_CERTS as local variable and updated the npm configuration:
$env:NODE_EXTRA_CA_CERTS=path\to\certificate.pem
npm config set cafile "path\to\certificate.pem"
but it seems not to work.
Do you have any insight on this?
Thank you very much
Giovanni
17 Apr 2025 01:34 PM
I am happy to hear that your problem was resolved!
Connectivity problems are challenging to debug outside your network, but I can try to guide you.
Can you provide me with more details about your internal network:
17 Apr 2025 02:27 PM
Thanks for your kindness and prompt response!
So after some more investigations, it appears that I cannot authenticate to the environment:
PS C:\Users\> Invoke-WebRequest -Uri https://{environmentid}.apps.dynatrace.com
Invoke-WebRequest : {"error":{"code":401,"message":"Authentication required","details":{"traceId":"260ffed84cc1e6f01fd5dd5be95ddb4c"}}}
But it seems that the enpoint is correctly reached:
PS C:\Users> Invoke-WebRequest -Uri https://{environmentid}.apps.dynatrace.com/platform/oauth2/authorization/dynatrace-sso
StatusCode : 200
StatusDescription : OK
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 3035
Content-Type: text/html;charset=utf-8
Date: Thu, 17 Apr 2025 13:13:30 GMT
Also on node.js :
PS C:\Users\> node -e "fetch('https://{environmentid}.apps.dynatrace.com').then(console.log)"
Response {
[Symbol(realm)]: null,
[Symbol(state)]: {
aborted: false,
rangeRequested: false,
timingAllowPassed: true,
requestIncludesCredentials: true,
type: 'default',
status: 401,
PS C:\Users\> node -e "fetch('https://{environmentid}.apps.dynatrace.com/platform/oauth2/authorization/dynatrace-sso').then(console.log)"
Response {
[Symbol(realm)]: null,
[Symbol(state)]: {
aborted: false,
rangeRequested: false,
timingAllowPassed: true,
requestIncludesCredentials: false,
type: 'default',
status: 200,
About our internal network: we have an authenticated proxy to connect to internet endpoints, but looking at the previous outputs, the environment seems to be reachable from our machine within the corporate network, correct?
Do you know how authentication is supposed to be performed? Are there other parameters that we need to specify?
Thank you
17 Apr 2025 02:43 PM
Thank you for sharing the details with me!
Yes, it looks like the required endpoints are reachable from your PowerShell.
As the next step, please use the internal proxy with the dt-app by setting the following environment variable:
18 Apr 2025 10:31 AM
Thanks for the suggestion: I applied the env variable as described, with our internal proxy, but unfortunately we recieve the same error.
I also tried to authenticate with the "Dynatrace apps" VS extention, but we recieve the following error:
Error: Error fetching token: Tokens not found
at CO.fetchTokens (c:\Users\xxxxx\.vscode\extensions\dynatrace.dynatrace-apps-0.28.1\lib\extension.js:776:5033)
at async CO.createSession (c:\Users\xxxxx\.vscode\extensions\dynatrace.dynatrace-apps-0.28.1\lib\extension.js:776:4312)
at async Sw.$createSession (file:///c:/Users/xxxxx/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:113:3533)
These are app logs after we performed the command npx dt-app dev:
2025-04-18T10:33:53.911Z DEBUG [AUTH] Retrieving SSO-URL for environment 'https://{environmentid}.apps.dynatrace.com'
2025-04-18T10:33:53.911Z DEBUG [HTTP(S)] Execute GET request without allowing redirection to 'https://{environmentid}.apps.dynatrace.com/platform/oauth2/authorization/dynatrace-sso'
2025-04-18T10:33:54.000Z DEBUG [AUTH] SSO-URL for 'https://{environmentid}.apps.dynatrace.com' could not be processed.
2025-04-18T10:33:54.000Z DEBUG [AUTH] Error: fetch failed
2025-04-18T10:33:54.002Z ERROR Error: SSO-URL for 'https://{environmentid}.apps.dynatrace.com' could not be processed.
fetch failed
18 Apr 2025 11:16 AM
It might be worth checking your firewall settings if the proxy isn't resolving the issue. It's possible that the dt-app CLI is an unknown application, and access to the network/internet is being blocked.
I recommend discussing this further with your IT department. For additional guidance, please contact Dynatrace support, as this issue may require a more detailed investigation: https://one.dynatrace.com/hc/en-us/requests