-
Notifications
You must be signed in to change notification settings - Fork 213
source-map-support module not found #1131
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
Comments
Do you use sourcemap support anywhere in the project? I just followed the steps https://aws-quickstart.github.io/cdk-eks-blueprints/getting-started/ with the only modification of running forced install of the lib here is my file:
If you used source map support, please consider installing it with Happy to provide more insight if you share your codebase. |
we do not use source map support anywhere in our code. manual/forced install does indeed fix the issue, but we do not require source-map-support anywhere in our code. |
@notwaf if I will update the docs to call out |
ah, i meant that manually installing the source-map-support module/package fixes the issue. but it doesn't seem to make much sense since we don't use that package anywhere in our code. |
tried to install using |
also, to clarify, using the sample code that you provided above also gives the same module not found error. this is done in a completely new empty temp directory.
|
I see you are running The ts file is expected to be under /bin folder and the execution command is I have not tried it with node v23.11. I would advise to stick with LTS releases like v22.14.0. import * as cdk from 'aws-cdk-lib';
import * as blueprints from "@aws-quickstart/eks-blueprints";
const app = new cdk.App();
blueprints.EksBlueprint.builder().version("auto").build(app, 'mm'); As an example I am attaching my sample project. Unzip it to a new folder and run |
gotcha, let me test this out. it errors out whether run with |
hrm.... following what you described above does in fact work and i can see that source-map-support was installed in the node_modules dir in that test/temp dir. however, if i clean up our repo and completely remove all node_modules dirs and run a |
i should also clarify that we use npx + npm to run this as well as workspaces, which i forgot to mention originally. there might be some weird interaction going on that causes the module to not be installed we invoke the cdk call by doing |
@notwaf you can add source map as an explicit dependency with When dropping node_modules please also drop package-lock.json:
|
ahh let me try that. yeah, adding source-map-support as an explicit dependency does work, but it shouldn't be necessary i think. let me test that again. |
nope, no cigar. removed the node_modules dir and package-lock file. then ran |
what version of npm? seems like it is more on the npm side than anything else. I tested with 10.9.2 |
|
it does look like the upbound addon does in fact import source-map-support (
|
make sure in your tsconfig you exclude node_modules (see example tsconfig.json that I shared before). if you can supply some simplified codebase that I can use to reproduce, that would enable me to give you a better answer. That is assuming that you don't use upbound addon. If you do, then please add sourcemap to your package.json |
yeah, we don't use the upbound addon. added the excludes to the tsconfig file as well. i do realize that we differ slightly in the way we invoke cdk. we use tsx to invoke it instead of node. the sample file that you gave above is what i'm testing in the bin dir of our cdk, which still errors. the below code in our repo produces the module not found error.
also attaching the tsconfig files in case there's something there also: this is where we invoke cdk from, 2 dirs in from the root of the repo |
@notwaf given the peculiarity of your setup compared to what we test against, would the workaround of explicit sourcemap declaration work for you in the interim? It seems that tsx approach tries to compile imported modules regardless of the settings. I will fix the upbound addon now, it will be in the next release which I expect shortly, depending on how fast we can process the auto mode PR that is currently in draft. |
yep, we'll include the explicit declaration for now. or wait for the pr to merge in. thanks! |
Describe the bug
we use eks-blueprints to deploy out eks infra. trying to run it with aws cdk v2.173.4 gives a module not found error.
Expected Behavior
cdk should run successfully to deploy eks cluster
Current Behavior
error message produced
Reproduction Steps
run the below code
Possible Solution
No response
Additional Information/Context
running any command in cdk produces this error after migration from v2.133.0 to 2.173.4. not sure if we are doing something wrong, or if there is a bug somewhere
CDK CLI Version
2.173.4 (build 1dadd61)
EKS Blueprints Version
1.16.3
Node.js Version
v22.14.0
Environment details (OS name and version, etc.)
linux, debian 12.9, aarch64
Other information
No response
The text was updated successfully, but these errors were encountered: