@forge/api v2.18.0 has missing typescript types

Getting errors like these:

node_modules/@forge/api/out/api/runtime.d.ts:1:36 - error TS2307: Cannot find module '@forge/util/packages/metrics-interface' or its corresponding type declarations.

1 import type { Metrics, Tags } from '@forge/util/packages/metrics-interface';
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:2:55 - error TS2307: Cannot find module 'packages/forge-auth/out/jira' or its corresponding type declarations.

2     readonly onJira: (projectPermissionsInput: import("packages/forge-auth/out/jira").ProjectPermission[]) => Promise<import("packages/forge-auth/out/jira").ProjectPermissionResponse[]>;
                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:2:126 - error TS2307: Cannot find module 'packages/forge-auth/out/jira' or its corresponding type declarations.

2     readonly onJira: (projectPermissionsInput: import("packages/forge-auth/out/jira").ProjectPermission[]) => Promise<import("packages/forge-auth/out/jira").ProjectPermissionResponse[]>;
                                                                                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:3:47 - error TS2307: Cannot find module 'packages/forge-auth/out/jira' or its corresponding type declarations.

3     readonly onJiraProject: (projects: import("packages/forge-auth/out/jira").Id | import("packages/forge-auth/out/jira").Id[]) => Record<string, import("packages/forge-auth/out/types").PermissionCheck>;
                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:3:91 - error TS2307: Cannot find module 'packages/forge-auth/out/jira' or its corresponding type declarations.

3     readonly onJiraProject: (projects: import("packages/forge-auth/out/jira").Id | import("packages/forge-auth/out/jira").Id[]) => Record<string, import("packages/forge-auth/out/types").PermissionCheck>;
                                                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:3:154 - error TS2307: Cannot find module 'packages/forge-auth/out/types' or its corresponding type declarations.

3     readonly onJiraProject: (projects: import("packages/forge-auth/out/jira").Id | import("packages/forge-auth/out/jira").Id[]) => Record<string, import("packages/forge-auth/out/types").PermissionCheck>;
                                                                                                                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:4:43 - error TS2307: Cannot find module 'packages/forge-auth/out/jira' or its corresponding type declarations.

4     readonly onJiraIssue: (issues: import("packages/forge-auth/out/jira").Id | import("packages/forge-auth/out/jira").Id[]) => Record<string, import("packages/forge-auth/out/types").PermissionCheck>;
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:4:87 - error TS2307: Cannot find module 'packages/forge-auth/out/jira' or its corresponding type declarations.

4     readonly onJiraIssue: (issues: import("packages/forge-auth/out/jira").Id | import("packages/forge-auth/out/jira").Id[]) => Record<string, import("packages/forge-auth/out/types").PermissionCheck>;
                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:4:150 - error TS2307: Cannot find module 'packages/forge-auth/out/types' or its corresponding type declarations.

4     readonly onJiraIssue: (issues: import("packages/forge-auth/out/jira").Id | import("packages/forge-auth/out/jira").Id[]) => Record<string, import("packages/forge-auth/out/types").PermissionCheck>;
                                                                                                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@forge/api/out/authorization/index.d.ts:5:89 - error TS2307: Cannot find module 'packages/forge-auth/out/types' or its corresponding type declarations.

5     readonly onConfluenceContent: (contentId: string | number) => Record<string, import("packages/forge-auth/out/types").PermissionCheck>;
                           

And the install itself doesn’t have a packages directory anywhere. v2.7.0 is the last one that worked. I’m updating to see if a bug was resolved (await webTrigger.getUrl(...) returns webtrigger url for the wrong environment)

1 Like

Thanks for the report, and sorry that Forge is giving you trouble!

This looks like an oversight, we’ll look into it.

Can you please show the command you are running which gives these errors?

Hey @IlyaRadchenko,

Regarding the following,

I’m updating to see if a bug was resolved (await webTrigger.getUrl(...) returns webtrigger url for the wrong environment)

Is this a seperate issue that you are facing?

If so, could you also please share steps we can take to reproduce this? I have tried to reproduce this locally by deploying an app into each environment with a trigger declared in the manifest, then generating and returning a URL for that trigger when the app is invoked. However, the returned URL’s are distinct and seem to correctly correlate to each environment respectively.

Thank you!

1 Like

We have released @forge/api version 2.18.1 which fixes these errors, and will be looking at how to prevent this from reoccurring. Thank you for the report, and do let us know if you still encounter problems!

1 Like

I think it has to do with my environment, because I couldn’t even delete dev apps that were installed.

Ah interesting! Is this something that you need our assistance with?

Maybe after I resolve Async Events Queue times out after 25sec - #3 by IlyaRadchenko