diff --git a/packages/gluestack-ui/src/dependencies.ts b/packages/gluestack-ui/src/dependencies.ts index 9cd643130..caaf55efe 100644 --- a/packages/gluestack-ui/src/dependencies.ts +++ b/packages/gluestack-ui/src/dependencies.ts @@ -62,6 +62,9 @@ const projectBasedDependencies: Dependencies = { '@gluestack-ui/core': '^3.0.10', '@gluestack-ui/utils': '^3.0.11', }, + devDependencies: { + 'babel-plugin-module-resolver': '^5.0.0', + }, }, 'react-native-cli': { dependencies: { diff --git a/packages/gluestack-ui/src/util/config/expo-config-helper.ts b/packages/gluestack-ui/src/util/config/expo-config-helper.ts index 3b1853477..345ddee07 100644 --- a/packages/gluestack-ui/src/util/config/expo-config-helper.ts +++ b/packages/gluestack-ui/src/util/config/expo-config-helper.ts @@ -3,8 +3,10 @@ import fg from 'fast-glob'; import * as fs from 'fs'; import { config } from '../../config'; import { _currDir, getFilePath, pathResolver } from '.'; -import { PROJECT_SHARED_IGNORE, ExpoResolvedConfig } from './config-types'; -import { execSync } from 'child_process'; +import { + PROJECT_SHARED_IGNORE, + ExpoResolvedConfig, +} from './config-types'; import { ensureFilesPromise } from '..'; import { commonInitialization } from '../init'; @@ -88,21 +90,6 @@ async function initNatiwindExpoApp( permission: boolean ) { try { - // Use the configured package manager instead of hardcoded npx expo install - const packageManager = config.packageManager || 'npm'; - const commands: { [key: string]: string } = { - npm: 'npm install babel-plugin-module-resolver', - yarn: 'yarn add babel-plugin-module-resolver', - pnpm: 'pnpm add babel-plugin-module-resolver', - bun: 'bun add babel-plugin-module-resolver', - }; - - const installCommand = commands[packageManager]; - if (installCommand) { - execSync(installCommand, { - stdio: 'inherit', - }); - } await commonInitialization(config.expoProject, resolvedConfig, permission); } catch (err) { throw new Error((err as Error).message);