From 70062c4496a8a5392be81a2f458267798f3ad44e Mon Sep 17 00:00:00 2001 From: Mato Ilic Date: Tue, 17 Jan 2017 16:04:18 +0100 Subject: [PATCH 1/3] Create empty package.json in e2e test Create empty package.json in e2e test while installing packaged CLI to prevent installation issues. --- tasks/e2e-simple.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 855172c7df8..de1a51dcc53 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -152,6 +152,7 @@ mv package.json.orig package.json # Install the CLI in a temporary location cd $temp_cli_path +echo "{}" > package.json npm install $cli_path # Install the app in a temporary location From d981198f1077878268ee207feb7134ab49e57ca4 Mon Sep 17 00:00:00 2001 From: Mato Ilic Date: Sun, 5 Mar 2017 12:25:11 +0100 Subject: [PATCH 2/3] Use "npm init" to initialize package.json instead of just writing an empty object into it. --- tasks/e2e-simple.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index de1a51dcc53..7d6fac9a652 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -152,7 +152,12 @@ mv package.json.orig package.json # Install the CLI in a temporary location cd $temp_cli_path -echo "{}" > package.json + +# Initialize package.json before installing the CLI becuase npm will not install +# the CLI properly in the temporary location if it is missing. +npm init --yes + +# Now we can install the CLI from the local package. npm install $cli_path # Install the app in a temporary location From 062f34dfe40c2dfdefe038e04771b0be7b2c7aaa Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sun, 5 Mar 2017 15:29:30 +0000 Subject: [PATCH 3/3] Fix typo --- tasks/e2e-simple.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 7d6fac9a652..23d9cb1691c 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -153,7 +153,7 @@ mv package.json.orig package.json # Install the CLI in a temporary location cd $temp_cli_path -# Initialize package.json before installing the CLI becuase npm will not install +# Initialize package.json before installing the CLI because npm will not install # the CLI properly in the temporary location if it is missing. npm init --yes