Skip to content

Commit bcdf64f

Browse files
matoilicrandycoulman
authored andcommitted
Create empty package.json in e2e test (facebook#1401) (facebook#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
1 parent 6b713cc commit bcdf64f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tasks/e2e-simple.sh

+6
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ mv package.json.orig package.json
152152

153153
# Install the CLI in a temporary location
154154
cd "$temp_cli_path"
155+
156+
# Initialize package.json before installing the CLI because npm will not install
157+
# the CLI properly in the temporary location if it is missing.
158+
npm init --yes
159+
160+
# Now we can install the CLI from the local package.
155161
npm install "$cli_path"
156162

157163
# Install the app in a temporary location

0 commit comments

Comments
 (0)