Skip to content

Commit

Permalink
Merge pull request #25908 from storybookjs/dannyhw/fix-rn-init-existi…
Browse files Browse the repository at this point in the history
…ng-package

React Native: Fix init fails when package is already installed
  • Loading branch information
yannbf authored Feb 5, 2024
2 parents dda2226 + 4be9052 commit 985505a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions code/lib/cli/src/generators/REACT_NATIVE/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ const generator = async (

const reactVersion = packageJson.dependencies.react;

const packagesToResolve = [
// addon-ondevice-controls peer deps
const controlsPeerDependencies = [
'react-native-safe-area-context',
'@react-native-async-storage/async-storage',
'@react-native-community/datetimepicker',
'@react-native-community/slider',
].filter((dep) => !packageJson.dependencies[dep] && !packageJson.devDependencies[dep]);

const packagesToResolve = [
...controlsPeerDependencies,
'@storybook/addon-ondevice-controls',
'@storybook/addon-ondevice-actions',
'@storybook/react-native',
Expand Down

0 comments on commit 985505a

Please sign in to comment.