-
Notifications
You must be signed in to change notification settings - Fork 4
Error when deploying with link to local Mira #88
Comments
Temporary workaround is to use |
Interesting. I'm having difficulty reproducing. Then again, I had trouble utilizing the While i can continue working to repro this, the first question i may ask is: why are we using The error reads as though the Mira code is trying to find a Where I also have questions is why |
@mikegwhit , I've also seen a bug (presumably the same one) on Windows but thought it was my setup - I had to remove a '.cmd' from one statement, but it seemed to be needed elsewhere. Please go ahead and make an issue ticket for the bug and then fix it. |
In order to make changes to the Mira library while testing that the changes work in a project, so both repos are local to the developer.
|
It's to capture the output of the deployed stack, e.g. In response to this problem aws/aws-cdk#1773 |
For the moment, the only discernible fix I can verify is that we copy the local Mira folder into the target application's The reason for this is because (I suspect) you cannot link Mira (or any Node package) and read from the target applications
Other tactics tried were to remove the node_modules folder within the Mira dependency (regardless of method used). Tried to copy Aside from copying files (not ideal), there are two strategies:
Due to previously experiencing errors with CDK stemming from this pattern, I'm inclined toward the option of cajoling Node to read from the application's
We can confirm that requiring Mira as a node_module works. It just fails when we require it locally. This pattern of issue was similarly experienced when we implemented Mira previously. We opted for a development strategy that allowed us to:
We also had a development process of developing constructs within the Mira package itself. There wasn't as heavy a need to test outside of the Mira package, or we had some assurance that when we did first test changes that we had a somewhat mirrored environment within the Mira package -- we were assured to some extent that we weren't repeatedly patch-fixing our way to a working build. When we did have to patch-fix, we had a way to get the team up-to-date and assuredly on the same page. AFAIK, this set of issues is known to the CDK team. I communicated with them back on April on this set of issues. It seemed like the consensus was that CDK was not yet ready to be bundled into an application wrapper (e.g. Mira) and then installed globally. The only reason we have succeeded with Mira as a node_module is because of peer dependencies. As specified, I strongly suspect this issue is related to (but different from) the same set of reasons CDK is temperamental about peer dependencies. Will try to pursue the above mentioned solutions tomorrow. Otherwise, can pursue a script that hard-copies Mira to a target application on-demand. |
I need to boil this down into the barebones of what is needed, but assuming a Then this command works with a symlink'd The secret sauce is If that command works, then we should be able to modify the |
Today, discovered some aspects of the proposed fix showed as a false positive. In short:
Where this is currently going wrong is that Mira still will read from |
Describe the bug
When working on a project with Mira linked locally (folder link or via
npm link
), thenpm run deploy
command fails with an error:This makes it hard to work on changes to Mira.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The error should not appear and the deploy should succeed
Screenshots
Additional context
May be tied to a particular CDK upgrade. Nigel has reported success with CDK 1.60.0 but I've not yet reproduced that.
Error doesn't occur when pulling mira from npm.
The text was updated successfully, but these errors were encountered: