I am getting this error:
arn:aws:cloudformation:us-east-1:<account>:stack/cdk-workshop/79cdc290-bb48-11ec-87f4-0a9e17cd1915
current credentials could not be used to assume 'arn:aws:iam::<account>:role/cdk-hnb659fds-lookup-role-<account>-us-east-1', but are for the right account. Proceeding anyway.
(To get rid of this warning, please upgrade to bootstrap version >= 8)
Everything works correctly, but I cannot find any documentation to tell me what bootstrap version I am on or how to change it. I have used npm to update the CDK version and then re-ran bootstrap without succcess.
You can check the AWS Cloudformation stack, and find a stack named "CDKToolkit". The version of the value of the output key name "BootstrapVersion" in the stack. If you can't find the "CDKToolkit" stack or just try to fix the problem quickly. You can exec 'npm bootstrap' under your project. CDK will create/update it for you.
Related
So I'm a cdk and typescipt beginner.
After successfully deploying a couple of stacks I'm not getting the following error with cdk synth: Unexpected token export. Subprocess exited with error 1.
I'm less interested in solving this issue and more interested to where the stack trace is, or any kind of additional info about the error. Doing a --trace or -v does not really provide much helpful info.
Any ideas how I can obtain such information????
What happened behind the scene is that CDK converts to stack into a cloudformation template and saves it into S3 - The S3 bucket created when running cdk bootstrap(More info here).
When you run cdk synth, CDK trying to convert the code ( in your case typescript) into cloudformation stack. this error: Unexpected token export. could be since async call that didn't end, in addition, this error means that your code could not be transferred into cloudformation stack, but it doesn't mean your "cdk" code is broke.
When you run cdk deploy cdk compare the transferred template with the S3 template. And deploy only the diffs.
Update:
Yesterday DevopsStart publish new article about debuuging cdk in vs code.
This might be helpful.
CDK Debugging in VSCode.
I believe the issue is because npx is used to run ts-node under the hood and npx appears to swallow the stack as described here.
One work around is add a try/catch block, e.g.
try {
main()
} catch (e) {
console.log(e)
throw e
}
So I think this is being caused by some javascript (yours or possibly in an imported module) that is using ESM export syntax.
This confused me a little at first because I'm using import/export syntax all over my project however the project is written in typescript which means that it's being compiled to javascript before execution and most likely all of these ESM statements are being emitted in CJS syntax. I however was also using lodash-es because I preferred the import syntax. This module internally uses ESM syntax in javascript and as such this is interpreted directly by the node runtime. Modern versions of node can use ESM syntax however only under specific package configs which mine did not have. My solution was just to remove the offending package however you may be able to go the other direction and configure your package.json such that ESM is enabled in node. This may also require your tsconfig.json to be updated such that the typescript compiler also emits ESM.
https://nodejs.org/api/esm.html
Passing --debug flag helped me.
cdk synth --debug
I downloaded a serverpush example called GrailsChat and trying to run is on grails 2.4.4.
I had some issues with dependencies missing that took me a while to figure out (don't think it's related but just mentioning it).
When I run grails run-app I get:
| Application metadata not found, please run: grails upgrade
When I run grails upgrade I get
| Script 'Upgrade' not found, did you mean:
1) MigrateDocs
2) IntegrateWith
3) SetGrailsVersion
4) InstallDependency
5) DependencyReport
> Please make a selection or enter Q to quit:
I figure the issue is probably to do with the grails version I have being newer than the grails version that the sample app was targetting but I don't want to move back version simply to run an example (I'd rather understand the underlying issue).
Can anyone point me to some documentation that will help me understand what the application metadata is and how to move forward please?
Grails Upgrade command is removed in 2.4. You might have to upgrade the app manually following the guide.
Or you can just run the service wrapper which will download the grails version automatically base on the app.
./grailsw run-app
It seems like you have missed any one of mentioned
Not set grails proper Version
Missing application.properties file (with proper grails version)
Title says it all.
If I understand correctly, the Heroku VM environment provides some built-in binaries and then additional ones can be provided in a custom build pak.
Trial (by building a little test app) and error (by having the build fail) is the only way forward so far. Surely there's a better way.
I have read the Heroku docs and looked in obvious places in the Ruby build pak source. No list.
My immediate aim is to determine if a Rails app that requires GD2 graphics (the gd2-ruby gem) will build without a custom build pak. But the general question of binaries availability comes up again and again.
Run heroku run bash, and get a shell in a plain dyno. Then list all rpms installed by invoking dpkg --get-selections, as for example here: https://askubuntu.com/questions/17823/how-to-list-all-installed-packages or here: http://www.howtogeek.com/howto/linux/show-the-list-of-installed-packages-on-ubuntu-or-debian/
I've successfully deployed a grails application to Heroku's cedar stack, which is currently supported.
However, to generate the war it runs
grails -plain-output -Divy.default.ivy.user.dir=/app/tmp/repo.git/.cache war
which doesn't include the --non-interactive option so when in need of updating a plugin, grails offers the prompt to answer to this question:
You currently already have a version of the plugin installed [resources-1.0.2]. Do you want to update to [resources-1.1.5]? [y,n]
Since Heroku doesn't accept input when running remote commands, one can't answer this question and deploy is aborted.
Adding the --non-interactive option is highly unlikely (though it would be the preferred approach), so I'd like to "reset" the cedar stack to its initial state. Heroku's dev center doesn't help much, does anybody know how this can be achieved?
There's an option for priming your grails cache. You should be able to use it to work around this issue by checking in an empty directory and effectively clearing your cache. Just add an empty directory called ivy-cache and check it in to the root of your project.
I also opened an issue on the build pack to get the --non-interactive flag added in: https://github.com/heroku/heroku-buildpack-grails/issues/15
I'm working on a symfony project and I need a user access conected to an LDAP server. So I searched for something already done to add to my app and found this plugin that has all I wanted.
So I tried to install with the command $ php symfony plugin:install bhLDAPAuthPlugin
for some reason it throws me this error:
No release avaiable for plugin "bhLDAPAuthPlugin"
I don't really understand what that message means. I've checked the spell of the command (also copied the command given in the page of the plugin) and same error appears. If I had no all requeriments for instalation, other errors would be thrown, right?
PS: If you know some easy way to implement by myself the comunication with LDAP (Microsoft Active Directory) will also be appreciated.
No exactly sure how to solve the error message, perhaps it helps is specifically specify which version you wish to install.
Otherwise there's an easy workaround:
Just download the tgz file from here:
http://www.symfony-project.org/plugins/bhLDAPAuthPlugin/6_0_0
and do
php symfony plugin:install bhLDAPAuthPlugin-etc-etc.tgz