Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken type interference after update #109

Open
charlee-dev opened this issue Feb 23, 2025 · 2 comments
Open

Broken type interference after update #109

charlee-dev opened this issue Feb 23, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@charlee-dev
Copy link

charlee-dev commented Feb 23, 2025

Hi. I updated my repo to the latest and now getting errors on the services using the effect-aws.

The error:
Image

the service code in the minimal example:

import {DynamoDBDocument} from '@effect-aws/lib-dynamodb'
import {Effect as E} from 'effect'

export class TestStore extends E.Service<TestStore>()('@app/TestStore', {
  effect: E.gen(function* () {
    const client = yield* DynamoDBDocument

    return {
      getById: ({id}: {id: string}) =>
        client.get({TableName: 'test', Key: {PK: id}}),
    }
  }),
  dependencies: [DynamoDBDocument.defaultLayer],
}) {}

Versions:

  "dependencies": {
    "@aws-sdk/client-dynamodb": "^3.751.0",
    "@aws-sdk/client-s3": "^3.750.0",
    "@aws-sdk/util-dynamodb": "^3.751.0",
    "@effect-aws/client-s3": "^1.9.0",
    "@effect-aws/client-dynamodb": "^1.9.0",
    "@effect-aws/lib-dynamodb": "^1.9.0",
    "@effect/platform": "^0.77.2",
    "aws-cdk-lib": "^2.180.0",
    "constructs": "^10.4.2",
    "effect": "3.13.2",
    "effect-lambda": "latest",
    "helmet": "latest"
  },
@charlee-dev
Copy link
Author

ow nvm adding pnpm install --save @effect-aws/commons fixed it ;)

@floydspace
Copy link
Owner

Hi @charlee-dev , thanks for raising it..
I think it is still the issue, bc @effect-aws/commons is not a peer dependency, so you should not be implicitly enforced installing it..

@floydspace floydspace reopened this Feb 23, 2025
@floydspace floydspace added the bug Something isn't working label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants