roninoss / create-expo-stack

CLI tool to initialize a React Native application with Expo. Provides options to include Typescript, file-based routing via Expo Router, configuration based routing via pure React Navigation, styling via Nativewind, Restyle, Unistyles, StyleSheets, or Tamagui, and/or backend as a service such as Firebase and Supabase.
https://rn.new
MIT License
1.5k stars 84 forks source link

TypeError: style.declarations.findLast is not a function #226

Closed fulutas closed 7 months ago

fulutas commented 7 months ago

Hello,

When I want to run with npx expo start or npm run start, I get the following error. can you help?

tailwindcss(ios) rebuilding... TypeError: style.declarations.findLast is not a function at setStyleForSelectorList (/Users/furkanulutas/Desktop/Project/expo-template/demo/node_modules/react-native-css-interop/src/css-to-rn/index.ts:358:54) at extractRule (/Users/furkanulutas/Desktop/Project/expo-template/demo/node_modules/react-native-css-interop/src/css-to-rn/index.ts:175:11) at Rule (/Users/furkanulutas/Desktop/Project/expo-template/demo/node_modules/react-native-css-interop/src/css-to-rn/index.ts:82:9) at cssToReactNativeRuntime (/Users/furkanulutas/Desktop/Project/expo-template/demo/node_modules/react-native-css-interop/src/css-to-rn/index.ts:76:15) at sendUpdate (/Users/furkanulutas/Desktop/Project/expo-template/demo/node_modules/react-native-css-interop/src/metro/poll-updates-server.ts:49:42) at Socket.<anonymous> (/Users/furkanulutas/Desktop/Project/expo-template/demo/node_modules/nativewind/src/metro/tailwind-cli.ts:106:17) at Socket.emit (node:events:527:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10)

Ekran Resmi 2024-03-18 15 12 00

frankcalise commented 7 months ago

@fulutas can you please provide the command to reproduce your project set up or a link to a repo with the problem happening?

fulutas commented 7 months ago

@fulutas can you please provide the command to reproduce your project set up or a link to a repo with the problem happening?

I just installed the project with "npx create-expo-stack@latest" command. then I did npm run start and got this error.

CLI Steps:

  1. No TS
  2. React Navigation
  3. Drawer+Tabs
  4. Tailwind
  5. None
danstepanov commented 7 months ago

Will take a look at this today

danstepanov commented 7 months ago

I'm on version v2.6.3 of create expo stack and I'm unable to reproduce this


 ~ npx create-expo-stack@latest
Need to install the following packages:
create-expo-stack@2.6.3
Ok to proceed? (y)
                          _
   ___  _ __  ___   __ _ | |_  ___
  / __|| '__|/ _ \ / _` || __|/ _ \
 | (__ | |  |  __/| (_| || |_|  __/
  \___||_|   \___| \__,_| \__|\___|
   ___ __  __ _ __    ___
  / _ \\ \/ /| '_ \  / _ \
 |  __/ >  < | |_) || (_) |
  \___|/_/\_\| .__/  \___/
       _     |_|        _
  ___ | |_  __ _   ___ | | __
 / __|| __|/ _` | / __|| |/ /
 \__ \| |_| (_| || (__ |   <
 |___/ \__|\__,_| \___||_|\_\

┌  Let's get started!
│
◇  What do you want to name your project?
│  my-expo-app
│
◇  Would you like to use TypeScript with this project?
│  Yes
Good call, now using TypeScript! 🚀
│
◇
We've detected npm v10.2.3 as your preferred package manager.
Would you like to continue using it?
│  Yes
│
◇  What would you like to use for Navigation?
│  React Navigation
│
◇  What type of navigation would you like to use?
│  Drawer + Tabs
│
◇  What would you like to use for styling?
│  NativeWind
You'll be styling with ease using Nativewind!
│
◇  What would you like to use for authentication?
│  None
No problem, skipping authentication for now.
│
◇  What would you like to support internationalization?
│  No
No problem, skipping internationalization for now.

Your project configuration:
{
  projectName: 'my-expo-app',
  packages: [
    {
      name: 'react-navigation',
      type: 'navigation',
      options: { type: 'drawer + tabs' }
    },
    { name: 'nativewind', type: 'styling' }
  ],
  flags: {
    noGit: false,
    noInstall: false,
    overwrite: false,
    importAlias: true,
    packageManager: 'npm'
  }
}

To recreate this project, run:
  npx create-expo-stack my-expo-app --react-navigation --drawer+tabs --nativewind
│
◇  Project initialized!
│
◇  Base assets copied!
│
◇  Dependencies installed!
│
◒  Cleaning up your project
> my-expo-app@1.0.0 format
> eslint "**/*.{js,jsx,ts,tsx}" --fix && prettier "**/*.{js,jsx,ts,tsx,json}" --write

◓  Cleaning up your project.=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=4.3.5 <5.4.0

YOUR TYPESCRIPT VERSION: 5.4.4

Please only submit bug reports when using the officially supported version.

=============
app-env.d.ts 95ms (unchanged)
app.json 6ms
App.tsx 5ms (unchanged)
babel.config.js 6ms (unchanged)
components/BackButton.tsx 7ms (unchanged)
components/Button.tsx 4ms (unchanged)
components/Container.tsx 3ms (unchanged)
components/EditScreenInfo.tsx 5ms (unchanged)
components/HeaderButton.tsx 7ms (unchanged)
components/ScreenContent.tsx 4ms (unchanged)
components/TabBarIcon.tsx 4ms (unchanged)
metro.config.js 3ms (unchanged)
navigation/drawer-navigator.tsx 6ms (unchanged)
navigation/index.tsx 4ms (unchanged)
navigation/tab-navigator.tsx 4ms (unchanged)
package-lock.json 82ms (unchanged)
package.json 1ms
prettier.config.js 1ms (unchanged)
screens/home.tsx 2ms (unchanged)
screens/modal.tsx 2ms (unchanged)
screens/one.tsx 1ms (unchanged)
screens/two.tsx 2ms (unchanged)
tailwind.config.js 1ms (unchanged)
tsconfig.json 0ms
◇  Project files formatted!
│
◇  Git initialized!

Success! 🎉 Now, just run the following to get started:

1. cd my-expo-app
2. npm run ios

│
└  If you frequently use create expo stack, please consider sponsoring the project ❤️
- https://github.com/sponsors/danstepanov```
fulutas commented 7 months ago

working now. thanks @danstepanov