Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Check for optional devDependencies (#3121)
Browse files Browse the repository at this point in the history
* Check for optional `devDependencies`

Noticed this bug when trying to eject without `devDependencies` defined in package.json.

* update

* Lint fixes
  • Loading branch information
benallfree authored Jan 25, 2021
1 parent cc8e4be commit 16f90a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/expo-cli/src/commands/eject/Eject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ function updatePackageJSONDependencies({
tempDir: string;
pkg: PackageJSONConfig;
}): DependenciesModificationResults {
if (!pkg.devDependencies) {
pkg.devDependencies = {};
}
const { dependencies, devDependencies } = getPackageJson(tempDir);
const defaultDependencies = createDependenciesMap(dependencies);
const defaultDevDependencies = createDependenciesMap(devDependencies);
Expand Down

0 comments on commit 16f90a8

Please sign in to comment.