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

Compilation error when using plan-only mode #2

Closed
bradley-campbell opened this issue Aug 1, 2022 · 3 comments
Closed

Compilation error when using plan-only mode #2

bradley-campbell opened this issue Aug 1, 2022 · 3 comments

Comments

@bradley-campbell
Copy link

bradley-campbell commented Aug 1, 2022

I'm running into an issue when trying to run the cdk action in plan-only mode.

Error: 022-08-01T15:23:24.626] [ERROR] default - TSError: ⨯ Unable to compile TypeScript:
Error: src/stacks/baseStack.ts(10,27): error TS2307: Cannot find module '../../.gen/modules/labelNull' or its corresponding type declarations.

From what I understand from the source code, it seems as though cdktf get is not run by the action and therefore the required modules are not compiled into JSII.

Is there a way to configure the action to run cdktf get before running a plan or deploy?

@DanielMSchmidt
Copy link
Collaborator

Sorry for the late reply! You would need to do get as an extra step before the action is invoked. I'll adjust the examples to include get specifically (I normally have get set up as a postinstall command)

@bradley-campbell
Copy link
Author

I tried your suggestion and it's working for me! Thanks for the reply

@github-actions
Copy link

I'm going to lock this issue because it has been closed for at least 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue so we can investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants