-
Notifications
You must be signed in to change notification settings - Fork 246
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
jsii-config produces non working configuration #4705
Comments
I tried this one in mac(macOS 15) to check if works. I am getting the same error. Just wondering if I am missing anything in the documentation. |
Note that it is converting TypeScript to JavaScript but Java or Python code is not generated. |
Double checking: |
When I'm trying to reproduce, I'm getting the error:
Can you please post the complete Ideally you can share a complete minimal example. |
Okay, I can reproduce this now. The error is wrong and misleading due to the wrong path being referenced. But basically these two lines conflict with each other: "types": "index.d.ts",
"jsii": {
"tsc": {
"outDir": "dist"
}
}, The TypeScript configuration ( Instead set the following and it should all work: "types": "dist/index.d.ts", Keeping this open since the error is clearly wrong. |
Thanks @mrgrain. Correcting
|
No worries @gankumaraamc
Typically
Now I'm guessing you came to your original config following our docs and they are incorrect or missing some important parts. Could you share what docs or tutorials you have been following? I'd like to fix these. |
Sure, I followed the getting started doc available in the jsii site - https://aws.github.io/jsii/user-guides/lib-author/quick-start/set-up/ |
Thanks that's helpful. Looks like |
I was also tripped up by the missing |
Describe the bug
I am getting started with jsii. I facing an issue when running
npm run build
. Below is my jsii configuration as created byjsii-config
The error I am getting is
[2024-11-10T12:04:33.432] [ERROR] jsii/compiler - Type model errors prevented the JSII assembly from being created
error JSII4: Could not find "main" file: C:\Workspace\internal\index.ts
The project is in C:\Workspace\internal\jsii-getting-started. It seems jsii is looking at the parent directory rather than the project directory.
Regression Issue
Expected Behavior
jsii should generate Java files
Current Behavior
I am getting this error
[2024-11-10T12:04:33.432] [ERROR] jsii/compiler - Type model errors prevented the JSII assembly from being created
error JSII4: Could not find "main" file: C:\Workspace\internal\index.ts
Reproduction Steps
Follow the steps listed in the documentation to create a sample project. Run the command
npm run build
. You will get the error in Windows 11 enterprisePossible Solution
None
Additional Information/Context
No response
SDK version used
jsii: 5.5.9 & jsii-pacmak: 1.104.0
Environment details (OS name and version, etc.)
Windows 11 Enterprise
The text was updated successfully, but these errors were encountered: