-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
β NOTICE: aws-cdk-lib: Resolution error: Cannot find module '../../region-info/build-tools/fact-tables' #31492
Comments
After inspecting the node_modules folder of the project, I found that build-tools folder is not present inside |
I have also encountered this issue, and can confirm that this is only happening in 2.159.0, since my builds started breaking after the last package publishing. Temporary solution: Pin to 2.158.0 or prior |
I'm also experiencing this issue |
Pinning to version |
Taking a look |
Can't reproduce it.
import * as cdk from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import { Construct } from 'constructs';
// import * as sqs from 'aws-cdk-lib/aws-sqs';
export class CdktestStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
new ec2.Vpc(this, 'MyVpc');
}
}
Yes! I noticed it. But I think still investigating |
Ran into the same issue. Pinning to version |
For those having this issue: Are you having the same error indicating fact-tables is missing?
|
@pahud Yes, exactly the same error |
OK reproducible. export class Cdk2159Stack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// create a random vpc endpoint for a new vpc
const vpc = new ec2.Vpc(this, 'vpc', {
maxAzs: 2,
natGateways: 1,
});
const securityGroup = new ec2.SecurityGroup(this, 'sg', { vpc });
securityGroup.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcp(443));
const endpoint = vpc.addInterfaceEndpoint('endpoint', {
service: ec2.InterfaceVpcEndpointAwsService.EC2,
securityGroups: [securityGroup],
});
}
} root cause could be - 95c49ab |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Fix is now released as part of v2.159.1 |
Please add your +1 π to let us know you have encountered this
Status:
RESOLVED
Released fix in version
v2.159.1
Overview:
cdk build failure in stacks due to incorrect export of '../../region-info/build-tools/fact-tables'
Complete Error Message:
On running command
npx cdk synth
Error: Resolution error: Resolution error: Resolution error: Cannot find module '../../region-info/build-tools/fact-tables'
Require stack:
`- /Documents/GitHub/test/node_modules/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.js
Versions:
"aws-cdk-lib": "^2.159.0",
Regression Issue
Last Known Working CDK Version
2.158.0
Expected Behavior
The synth operation should be successful without any error.
Current Behavior
The synth command is getting failed with the error:
Error: Resolution error: Resolution error: Resolution error: Cannot find module '../../region-info/build-tools/fact-tables'
Require stack:
Workaround:
Pin CDK version to
2.158.0
Solution:
Revert PR #31496
Reproduction Steps
Create a VPC stack by using import statement as
import * as ec2 from 'aws-cdk-lib/aws-ec2';
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.159.0
Framework Version
No response
Node.js Version
18.17.0
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: