Skip to content

Bug: Build of @aws-lambda-powertools/parameters fails as types/AppConfigProvider.ts uses import with absolute file name #1385

Closed
@karthikeyanjp

Description

@karthikeyanjp

Expected Behaviour

Refer code.

import type {
  AppConfigDataClient,
  AppConfigDataClientConfig,
  StartConfigurationSessionCommandInput,
} from '@aws-sdk/client-appconfigdata';
import type { GetOptionsInterface } from 'types/BaseProvider';

Import for GetOptionsInterface should be from './BaseProvider'.

Since the import is using an incorrect path, build fails. See error below:

│ ../../node_modules/.pnpm/@[email protected]/node_modules/@aws-lambda-powertools/parameters/types/AppConfigProvider.d.ts:2:42 - e
│ 2 import type { GetOptionsInterface } from 'types/BaseProvider';
│                                            ~~~~~~~~~~~~~~~~~~~~
│ Found 1 error in ../../node_modules/.pnpm/@[email protected]/node_modules/@aws-lambda-powertools/parameters/types/AppConfigProvi
│  ELIFECYCLE  Command failed with exit code 2.

Current Behaviour

GetOptionsInterface is imported from incorrect path.

import type {
  AppConfigDataClient,
  AppConfigDataClientConfig,
  StartConfigurationSessionCommandInput,
} from '@aws-sdk/client-appconfigdata';
import type { GetOptionsInterface } from 'types/BaseProvider';

Code snippet

GetOptionsInterface is imported from incorrect path.

import type {
  AppConfigDataClient,
  AppConfigDataClientConfig,
  StartConfigurationSessionCommandInput,
} from '@aws-sdk/client-appconfigdata';
import type { GetOptionsInterface } from 'types/BaseProvider';

Steps to Reproduce

pnpm run build

Possible Solution

Import GetOptionsInterface from correct path.

import type {
  AppConfigDataClient,
  AppConfigDataClientConfig,
  StartConfigurationSessionCommandInput,
} from '@aws-sdk/client-appconfigdata';
import type { GetOptionsInterface } from './BaseProvider';

AWS Lambda Powertools for TypeScript version

latest

AWS Lambda function runtime

18.x

Packaging format used

npm

Execution logs

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompletedThis item is complete and has been merged/shippedparametersThis item relates to the Parameters Utility

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions