You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2022. It is now read-only.
The lab code and all the import constructs are for AWS CDK V1, however Cloud9 now comes with CDK V2 and the lab does not work if someone was to copy/paste all the instructions. It requires users to troubleshoot the error.
I've done a small update on the CDK install instructions where it removes the CDK V2 from the default Cloud 9 instance and installs CDK V1 where all the dependencies work perfectly. Also added a CDK alias so no additional workshop instructions needs to be updated.
Copy file name to clipboardExpand all lines: workshop/content/javascript/buildpipe/cdkinit/_index.en.md
+13-9Lines changed: 13 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,13 @@ date = 2019-11-01T15:26:09-07:00
4
4
weight = 21
5
5
+++
6
6
7
-
## Install the latest CDK
7
+
## Install the CDK V1
8
8
9
-
If you are using Cloud9, the CDK is already pre-installed but it will likely be a few versions old. Run the following commands from the Cloud9 terminal to remove your current version and install the latest one:
9
+
If you are using Cloud9, the CDK is already pre-installed but it will likely be a the CDK V2. Where this workshop was published for AWS CDK V1. Run the following commands from the Cloud9 terminal to remove your current version we will initialize the pipeline with V1 in a bit:
10
10
```
11
-
npm uninstall -g aws-cdk
12
-
npm install -g aws-cdk
11
+
npm uninstall -g cdk
13
12
```
14
13
15
-
{{% notice tip %}}
16
-
If the Cloud9 terminal returns an error, use the `--force` flag: `npm install -g aws-cdk --force`
17
-
{{% /notice %}}
18
-
19
14
20
15
### Initialize project
21
16
@@ -29,7 +24,16 @@ cd pipeline
29
24
Initialize a new CDK project within the _pipeline_ folder by running the following command:
30
25
31
26
```
32
-
cdk init --language typescript
27
+
npx aws-cdk@1.x init app --language typescript
28
+
```
29
+
30
+
{{% notice tip %}}
31
+
You will be prompted to install ```aws-cdk@1.x```, go ahead and accept with ```y```.
32
+
{{% /notice %}}
33
+
34
+
Now add an alias as ```cdk``` for AWS CDK V1:
35
+
```
36
+
alias cdk="npx aws-cdk@1.x"
33
37
```
34
38
35
39
Now install the CDK modules that we will be using to build a pipeline:
0 commit comments