Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ BUG ] tailwindcss dependency not installed on existing expo project with CLI #316

Open
habaieba opened this issue Jan 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@habaieba
Copy link

Describe the bug
tailwindcss dependency is missing when setting up rnr with CLI on an existing expo project.

To Reproduce
Steps to reproduce the behavior:

  1. npx create-expo-app@latest
  2. npx @react-native-reusables/cli@latest init
  3. yarn start

Expected behavior
To resolve : npx expo install tailwindcss

Screenshots
yarn run v1.22.21
$ expo start --ios
Starting project at /Users/abdoupro/Documents/tech/my-app
Error: Cannot find module 'tailwindcss/package.json'
Require stack:

  • /Users/abdoupro/Documents/tech/my-app/node_modules/nativewind/dist/metro/tailwind/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/nativewind/dist/metro/index.js
  • /Users/abdoupro/Documents/tech/my-app/metro.config.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/import-fresh/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/cosmiconfig/dist/loaders.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/cosmiconfig/dist/createExplorer.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/cosmiconfig/dist/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/metro-config/src/loadConfig.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/metro-config/src/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/server/metro/instantiateMetro.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/server/metro/MetroBundlerDevServer.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/server/DevServerManager.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/startAsync.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/bin/cli
  • /Users/abdoupro/Documents/tech/my-app/node_modules/expo/bin/cli
    Error: Cannot find module 'tailwindcss/package.json'
    Require stack:
  • /Users/abdoupro/Documents/tech/my-app/node_modules/nativewind/dist/metro/tailwind/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/nativewind/dist/metro/index.js
  • /Users/abdoupro/Documents/tech/my-app/metro.config.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/import-fresh/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/cosmiconfig/dist/loaders.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/cosmiconfig/dist/createExplorer.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/cosmiconfig/dist/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/metro-config/src/loadConfig.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/metro-config/src/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/server/metro/instantiateMetro.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/server/metro/MetroBundlerDevServer.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/server/DevServerManager.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/startAsync.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/src/start/index.js
  • /Users/abdoupro/Documents/tech/my-app/node_modules/@expo/cli/build/bin/cli
  • /Users/abdoupro/Documents/tech/my-app/node_modules/expo/bin/cli
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Function.Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object. (/Users/abdoupro/Documents/tech/my-app/node_modules/nativewind/src/metro/tailwind/index.ts:2:1)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    error Command failed with exit code 1.
@habaieba habaieba added the bug Something isn't working label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant