From ebf5bd53940004d71b52010d1636c32d49e7cdcb Mon Sep 17 00:00:00 2001 From: Mato Ilic Date: Sun, 5 Mar 2017 18:13:26 +0100 Subject: [PATCH] Create empty package.json in e2e test (#1401) (#1402) * Create empty package.json in e2e test Create empty package.json in e2e test while installing packaged CLI to prevent installation issues. * Use "npm init" to initialize package.json instead of just writing an empty object into it. * Fix typo --- tasks/e2e-simple.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 7f70eeb4c3a..594f4604085 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -152,6 +152,12 @@ mv package.json.orig package.json # Install the CLI in a temporary location cd "$temp_cli_path" + +# 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 + +# Now we can install the CLI from the local package. npm install "$cli_path" # Install the app in a temporary location