I was just setting about starting a new project using aws-cdk in typescript. So, everything is working nicely. I obviously have node, npm and all that good stuff installed on my windows machine. I open up git bash in my new folder,
$ cdk --version
- blah blah blah. Tells me the version.
$ code .
$ npm update -g typescript
After which I see a fleeting message about deleting 200 packages. I ignore it. I close the git bash window to start working in Visual studio code. But after this NOTHING is working:
$ cdk init app --language typescript
bash: cdk: command not found.
I get this for everything including npm! I found that by reinstalling node.js it appears that everything is running again. Which is great. But can anyone explain what on earth happened there?