0

我目前正在尝试使用Salesforce的插件模板,似乎遇到了以下问题:

node_modules/@salesforce/core/lib/connection.d.ts:2:65 - error TS2307: Cannot find module 'jsforce/api/metadata' or its corresponding type declarations.

2 import { AsyncResult, DeployOptions, DeployResultLocator } from 'jsforce/api/metadata';
                                                                  ~~~~~~~~~~~~~~~~~~~~~~

node_modules/@salesforce/core/lib/connection.d.ts:3:26 - error TS2307: Cannot find module 'jsforce/connection' or its corresponding type declarations.

3 import { Callback } from 'jsforce/connection';
                           ~~~~~~~~~~~~~~~~~~~~

src/commands/hello/org.ts:70:31 - error TS2339: Property 'query' does not exist on type 'Connection'.

70     const result = await conn.query<Organization>(query);

conn.query 的问题,我不知道还能做什么,因为我还不太熟悉。

但是,这是存储库中的代码:

 // The type we are querying for
    interface Organization {
      Name: string;
      TrialExpirationDate: string;
    }

    // Query the org
    const result = await conn.query<Organization>(query);

有谁知道如何解决这些问题?

4

0 回答 0