FYI, just want to let you guys know that I'm writing this AWS CDK app with:
- TypeScript
- I'm using a Macbook to write the app,running macOS Mojave 10.14.6.
- my node version is 10.16.3
- NPM version is 6.9.0
- My AWS CDK version is 1.10.0 (build 19ae072). I got this detail by running
cdk --version
on my bash terminal
Problem definition
Hi everyone, I'm very VERY new to AWS CDK and currently I'm still playing around with it. So far I feel like it definitely offers so much more flexibility compared to typing cloudformation template.
However, one thing that I can't figure out is how to output values of a variable just like System.println()
in Java or console.log
in JavaScript
What I've tried so far
Now, I'm very new to TypeScript but so far I've tried using console.log() command in one of the TypeScript files and it just doesn't allow me to use it:
Everytime I try to do this:
console.log(name); //name is a string
I get this in visual studio:
It honestly doesn't help that I'm very new to TypeScript as well so that also comes into play with me having difficulty learning AWS CDK (but still, I'm loving it so far)
I already have the console node module installed in the cdk app project folder ./node_modules
right here:
~Any help would be greatly appreciated~
Thanks so much in advance! :)
npm install @types/console
so I rannpm install console
instead and it worked for me. – Gillard