Skip to content
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

Following docs - error JSII4: Could not find "main" file: ... - when building #4636

Open
stuMilk opened this issue Sep 4, 2024 · 1 comment
Labels
documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.

Comments

@stuMilk
Copy link

stuMilk commented Sep 4, 2024

Describe the issue

Following the instructions from Prerequisites and Quick Start onwards, but choosing Python instead of Java, I am bumping into the following error:

[__DATE_TIME__] [ERROR] jsii/compiler - Type model errors prevented the JSII assembly from being created
error JSII4: Could not find "main" file: __PATH_TO_FILE__ 

The file is referenced. No changes in config alter the message. The path given in the message reflects exactly the path of the referenced file. The code being used is exactly that in the docs.

TypeScript and JS files are being generated in the configured location, but no python.

I have looked at the file permissions and ownership, but there is nothing there to affect it. No sudo required (obviously).

I have tried running with --verbose and --debug but the error is thrown before additional languages are attempted, so no output.

So, what is this error, where is it documented and how is it mitigated?

env: MacOS Sonoma 14.6.1 - nodejs v20.17.0 - python 3.12

Links

https://aws.github.io/jsii/user-guides/lib-author/quick-start/set-up/

@stuMilk stuMilk added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Sep 4, 2024
@stuMilk
Copy link
Author

stuMilk commented Sep 6, 2024

It seems that the error was due to the fact that the jsii install was incomplete. The folders/files were not the same as appeared in the git repo (initially used an npm install). Git repo downloaded, alterations made and the error disappeared. Still Python does not build. There are steps missing from the jsii docs that could potentially relate to adding a pycache file to destination/source folders, or a requirements.txt file. The latter would prevent some github checks from failing.

Feel free to close this ticket. However, documentation is lacking in clarity, through too much information similar to the AWS docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant