npx projen upgrade-progen failing for cdk typescript projen
See original GitHub issueHi Team,
Once i started to upgrade the projen configuration of my AWS CDK Typescript Project. I am failing to compile the code with npm run build command. The following error is getting generated by the console.
node_modules/@types/node/child_process.d.ts:267:18 - error TS2304: Cannot find name 'AbortSignal'.
Here is the my .projenrc.js file
`const { AwsCdkConstructLibrary } = require(‘projen’);
const project = new AwsCdkConstructLibrary({
cdkVersion: ‘1.124.0’,
majorVersion: 0,
cdkDependencies: [ ‘@aws-cdk/core’, ‘@aws-cdk/aws-iam’, ‘@aws-cdk/aws-lambda’, ‘@aws-cdk/aws-events’, ‘@aws-cdk/aws-events-targets’, ‘@aws-cdk/custom-resources’, ‘@aws-cdk/aws-sns’, ‘@aws-cdk/aws-lambda-python’, ],
cdkTestDependencies: undefined, /* AWS CDK modules required for testing. */
deps: [ ],
devDeps: [ ‘ts-node’, ‘@aws-cdk/assert’, ],
// packageName: undefined, /* The “name” in package.json. / // release: undefined, / Add release management to this project. */ });
project.addPackageIgnore(‘.vscode’); project.addPackageIgnore(‘.devcontainer’); project.addPackageIgnore(‘devops-pipeline.yaml’); project.synth(); `
Please suggest what needs to be changed here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Sorry, I meant adding this as options to your projen file. It will then add it to the tsconfig file.
But I just saw that it is about at JSII project for constructs. Sadly, this fix does not work there on build time.
Only for plain TS projects.
The fix is released in the latest
@types/node
Remove your lock file and install again. This should fix it.