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

Typescript error on deployment to AWS #638

Closed
berkaytheunicorn opened this issue Sep 1, 2022 · 14 comments
Closed

Typescript error on deployment to AWS #638

berkaytheunicorn opened this issue Sep 1, 2022 · 14 comments
Labels
new-bug Bug report that needs triage Team Lamprey

Comments

@berkaytheunicorn
Copy link

I'm getting this error while deploying to AWS ElasticBeanstalk environment. BTW, In local, it works perfectly.

node_modules/algosdk/dist/types/src/types/utils.d.ts(19,84): error TS2344: Type 'K' does not satisfy the constraint 'Partial<T>'.

Local Environment

TS: 4.6.3
Node: 16.4
SDK: 1.19.1

EB Environment

TS: 4.6.3
Node: 16 running on 64bit Amazon Linux 2/5.5.5 (arm64)
SDK: 1.19.1
@berkaytheunicorn berkaytheunicorn added the new-bug Bug report that needs triage label Sep 1, 2022
@mploux
Copy link

mploux commented Sep 2, 2022

Exact same problem here, but it is during build time. Not specific to an AWS deployment

@barnjamin
Copy link
Contributor

@berkaey and @mploux do you have any more info on this? a longer stack trace even?

@berkaytheunicorn
Copy link
Author

I'm not sure it is directly related to algo-sdk because after I forced ts version to 4.7.4 and removing node_modules from tsconfig paths the error disappeared

@hernandp
Copy link

hernandp commented Sep 2, 2022

Same problem, output:

node_modules/algosdk/dist/types/src/types/utils.d.ts:19:84 - error TS2344: Type 'K' does not satisfy the constraint 'Partial<T>'.

19 export declare type DistributiveOverwrite<T, K> = T extends unknown ? Overwrite<T, K> : never;
                                                                                      ~

  node_modules/algosdk/dist/types/src/types/utils.d.ts:19:46
    19 export declare type DistributiveOverwrite<T, K> = T extends unknown ? Overwrite<T, K> : never;
                                                    ~
    This type parameter might need an `extends Partial<T>` constraint.

Node 16.16, Typescript 4.6.2

@hernandp
Copy link

hernandp commented Sep 2, 2022

UPDATE: Upgraded to Typescript 4.7.4, error gone.

@Vidhyanandcs
Copy link

Vidhyanandcs commented Sep 6, 2022

i am using typescript 4.8.2 node 16.14.2
Got the same error while trying to build locally

  `node_modules/algosdk/dist/types/src/types/utils.d.ts:19:84 - error TS2344: Type 'K' does not satisfy the constraint  'Partial<T>'.

 19 export declare type DistributiveOverwrite<T, K> = T extends unknown ? Overwrite<T, K> : never;
                                                                                  ~

 node_modules/algosdk/dist/types/src/types/utils.d.ts:19:46
 19 export declare type DistributiveOverwrite<T, K> = T extends unknown ? Overwrite<T, K> : never;
 This type parameter might need an `extends Partial<T>` constraint.`

@Vidhyanandcs
Copy link

UPDATE: Upgraded to Typescript 4.7.4, error gone.

Worked for me

@oliviera9
Copy link

Had the same problem with typescript 4.8.2. Downgraded to 4.7.4 and it's gone.

@alistairheath
Copy link

I'm seeing this too, it occurs at the original local build time but prevents publishing to Firebase Functions as well.

@AwolDes
Copy link

AwolDes commented Jan 12, 2023

UPDATE: Upgraded to Typescript 4.7.4, error gone.

Pinning to this version worked for me as well, an this is the tsconfig just in case it helps others

{
  "ts-node": {
    // these options are overrides used only by ts-node
    // same as the --compilerOptions flag and the TS_NODE_COMPILER_OPTIONS environment variable
    "compilerOptions": {
      "module": "commonjs"
    }
  },
 "compilerOptions": {
      "target": "ES2015",
      "module": "ES2020",
      "moduleResolution": "node",
      "sourceMap": true,
      "declaration": true,
      "declarationDir": "./lib/types",
      "outDir": "./lib/esm",
      "strict": true,
      "noImplicitAny":true,
      "strictNullChecks": true,
      "esModuleInterop": true,
      "allowJs": true,
      "lib": [ "es2015","DOM" ],
      "allowSyntheticDefaultImports": true
      // "types": ["jest", "@types/node","reflect-metadata"]
    },
    "include": ["src/**/*", "src/__tests__/t-tests.ts"],
    "exclude": ["node_modules", "**/__tests__/*", "src/build/*"],
  }

@ghost
Copy link

ghost commented Mar 21, 2023

Getting same error with
Angular Version: 15.2.2
Algosdk: 2.0.0
Typescript: 4.8.4

@barnjamin
Copy link
Contributor

@kalp-lathia this should be corrected in the next release (2.2.0), expecting it today or tomorrow

@Eric-Warehime
Copy link
Contributor

If this is fully resolved as of 2.2.0 we can close this. Is anyone still facing this issue?

@Eric-Warehime
Copy link
Contributor

Closing--please re-open if you continue to see this same issue occurring when using v 2.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage Team Lamprey
Projects
None yet
Development

No branches or pull requests

10 participants