You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get a number of compilation errors with jsii compiler with the latest version of libraries "@types/jest": "28.1.6" and "@types/prettier": "2.7.0"
Expected Behavior
Should compile without errors.
Current Behavior
Latest version of these 2 libraries cause jsii compilation errors.
"@types/jest": "28.1.6",
"@types/prettier": "2.7.0"
node_modules/@types/jest/index.d.ts:33:29 - error TS2694: Namespace 'jest' has no exported member 'Lifecycle'.
node_modules/@types/jest/index.d.ts:37:28 - error TS2694: Namespace 'jest' has no exported member 'Describe'.
node_modules/@types/jest/index.d.ts:40:22 - error TS2694: Namespace 'jest' has no exported member 'It'.
node_modules/@types/jest/index.d.ts:46:28 - error TS2694: Namespace 'jest' has no exported member 'Expect'.
node_modules/@types/jest/index.d.ts:416:46 - error TS7039: Mapped object type implicitly has an 'any' template type.
node_modules/@types/prettier/index.d.ts:41:54 - error TS2315: Type 'IsTuple' is not generic.
node_modules/@types/prettier/index.d.ts:53:6 - error TS2456: Type alias 'IsTuple' circularly references itself.
node_modules/@types/prettier/index.d.ts:53:65 - error TS2574: A rest element type must be an array type.
node_modules/@types/prettier/index.d.ts:96:5 - error TS2589: Type instantiation is excessively deep and possibly infinite.
This was caused by jest 28 requiring use of a newer TS version which was not supported by jsii at the time. This has now been fixed with the release of modern jsii versions: https://github.com/aws/jsii-compiler
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Describe the bug
Get a number of compilation errors with jsii compiler with the latest version of libraries "@types/jest": "28.1.6" and "@types/prettier": "2.7.0"
Expected Behavior
Should compile without errors.
Current Behavior
Latest version of these 2 libraries cause jsii compilation errors.
"@types/jest": "28.1.6",
"@types/prettier": "2.7.0"
node_modules/@types/jest/index.d.ts:33:29 - error TS2694: Namespace 'jest' has no exported member 'Lifecycle'.
node_modules/@types/jest/index.d.ts:37:28 - error TS2694: Namespace 'jest' has no exported member 'Describe'.
node_modules/@types/jest/index.d.ts:40:22 - error TS2694: Namespace 'jest' has no exported member 'It'.
node_modules/@types/jest/index.d.ts:46:28 - error TS2694: Namespace 'jest' has no exported member 'Expect'.
node_modules/@types/jest/index.d.ts:416:46 - error TS7039: Mapped object type implicitly has an 'any' template type.
node_modules/@types/prettier/index.d.ts:41:54 - error TS2315: Type 'IsTuple' is not generic.
node_modules/@types/prettier/index.d.ts:53:6 - error TS2456: Type alias 'IsTuple' circularly references itself.
node_modules/@types/prettier/index.d.ts:53:65 - error TS2574: A rest element type must be an array type.
node_modules/@types/prettier/index.d.ts:96:5 - error TS2589: Type instantiation is excessively deep and possibly infinite.
Reproduction Steps
Use the following dependencies:
"peerDependencies": {
"aws-cdk-lib": "2.37.0",
"constructs": ">=10.1.71"
},
"devDependencies": {
"aws-cdk-lib": "2.37.0",
"constructs": "10.1.71",
"jsii": "1.63.2",
"jsii-docgen": "7.0.67",
"jsii-pacmak": "1.63.2",
"@types/node": "18.6.5",
"@typescript-eslint/eslint-plugin": "5.33.0",
"@typescript-eslint/parser": "5.33.0",
"eslint": "8.21.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-node": "0.3.6",
"eslint-import-resolver-typescript": "3.4.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-license-header": "0.6.0",
"eslint-plugin-prettier": "4.2.1",
"jest": "28.1.3",
"jest-util": "28.1.3",
"source-map-support": "0.5.21",
"ts-node": "10.9.1",
"tslint": "6.1.3",
"typescript": "4.7.4",
"@types/jest": "28.1.1",
"@types/prettier": "2.6.0"
}
Possible Solution
Compilation works with these versions:
"@types/jest": "28.1.1",
"@types/prettier": "2.6.0"
Additional Information/Context
jsii compiler should work with latest versions.
SDK version used
See Reproduction Steps
Environment details (OS name and version, etc.)
linux
The text was updated successfully, but these errors were encountered: