create-expo-stack icon indicating copy to clipboard operation
create-expo-stack copied to clipboard

New app fails on: "Unable to resolve module react-native-css-interop/jsx-runtime"

Open samtsai opened this issue 1 year ago • 7 comments

Issue tracker is ONLY used for reporting bugs. New features should be discussed on our discord, in the #create-expo-stack channel.

Followed the steps on the website with: pnpm, expo router, NativeWindUI, all the available components: ╭────────────────────────────────────────────────╮ │ │ │ Click the link to download your project! │ │ │ │ https://dlp.rn.new/bR2sJxm17h │ │ │ ╰────────────────────────────────────────────────╯

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

  1. cd my-expo-app
  2. pnpm install
  3. pnpm expo prebuild --clean
  4. pnpm run ios

Expected Behavior

Step 4 and also via Web should load the app.

Current Behavior

I first tried with web and then also ios and both his: Unable to resolve module react-native-css-interop/jsx-runtime. image

Possible Solution

Steps to Reproduce

  1. Follow starter steps on https://rn.new/
  2. Run the app

CES Config File

{
  "cesVersion": "2.11.14",
  "projectName": "my-expo-app",
  "packages": [
    {
      "name": "nativewindui",
      "type": "styling",
      "options": {
        "selectedComponents": [
          "action-sheet",
          "activity-indicator",
          "activity-view",
          "avatar",
          "bottom-sheet",
          "date-picker",
          "picker",
          "progress-indicator",
          "ratings-indicator",
          "selectable-text",
          "slider",
          "text",
          "toggle"
        ]
      }
    },
    {
      "name": "expo-router",
      "type": "navigation",
      "options": {
        "type": "drawer + tabs"
      }
    }
  ],
  "flags": {
    "noGit": true,
    "noInstall": true,
    "overwrite": false,
    "importAlias": true,
    "packageManager": "pnpm",
    "eas": false
  },
  "packageManager": {
    "type": "pnpm",
    "version": "8.15.6"
  },
  "os": {
    "type": "Linux",
    "platform": "linux",
    "arch": "x64",
    "kernelVersion": "6.10.3-arch1-1.1"
  }
}

samtsai avatar Aug 28 '24 14:08 samtsai

@samtsai thanks for the report, we've recently been fixing some stuff around pnpm, I think we might need to update the website project generation.

If you try the same thing with the cli does it produce the same error?

dannyhw avatar Aug 28 '24 14:08 dannyhw

Okay I tried locally and it worked for both NativeWind and NativeWindUI

{
  "cesVersion": "2.11.22",
  "projectName": "expo-stack",
  "packages": [
    {
      "name": "expo-router",
      "type": "navigation",
      "options": {
        "type": "drawer + tabs"
      }
    },
    {
      "name": "nativewind",
      "type": "styling"
    }
  ],
  "flags": {
    "noGit": false,
    "noInstall": false,
    "overwrite": false,
    "importAlias": true,
    "packageManager": "pnpm",
    "eas": false
  },
  "packageManager": {
    "type": "pnpm",
    "version": "9.9.0"
  },
  "os": {
    "type": "Darwin",
    "platform": "darwin",
    "arch": "arm64",
    "kernelVersion": "23.6.0"
  }
}
{
  "cesVersion": "2.11.22",
  "projectName": "native-wind-ui",
  "packages": [
    {
      "name": "expo-router",
      "type": "navigation",
      "options": {
        "type": "drawer + tabs"
      }
    },
    {
      "name": "nativewindui",
      "type": "styling",
      "options": {
        "selectedComponents": [
          "action-sheet",
          "activity-indicator",
          "activity-view",
          "avatar",
          "bottom-sheet",
          "date-picker",
          "picker",
          "progress-indicator",
          "ratings-indicator",
          "slider",
          "text",
          "toggle"
        ]
      }
    }
  ],
  "flags": {
    "noGit": false,
    "noInstall": false,
    "overwrite": false,
    "importAlias": true,
    "packageManager": "pnpm",
    "eas": false
  },
  "packageManager": {
    "type": "pnpm",
    "version": "9.9.0"
  },
  "os": {
    "type": "Darwin",
    "platform": "darwin",
    "arch": "arm64",
    "kernelVersion": "23.6.0"
  }
}

samtsai avatar Aug 28 '24 16:08 samtsai

@samtsai thanks for checking 🙏

I will follow up and see about fixing the website version

dannyhw avatar Aug 28 '24 16:08 dannyhw

@dannyhw related? https://linear.app/ronintechnologies/issue/RON-185/add-no-install-option-for-ces-and-rnnew-integration

danstepanov avatar Aug 29 '24 05:08 danstepanov

@sammoore just went through this on the website and it seems to error out, know what's up?

danstepanov avatar Dec 07 '24 00:12 danstepanov

maybe the api needs to update its version of ces

dannyhw avatar Dec 07 '24 11:12 dannyhw

Trying to run this project configuration still causes a build issue via rn.new

  1. let's ensure rn.new is using the latest version of CES (@sammoore should be working on this Tuesday/Wednesday)
  2. rn.new seems to be recommending running pnpm expo prebuild --clean rather than npx expo prebuild --clean (might be related to (1))
  3. .gitignore seems to be included despite projects made with rn-new not running git init. This might be a good thing actually as I imagine folks will run git init locally and creating a gitignore seems annoying if you don't know what to add for a RN project

danstepanov avatar Mar 29 '25 00:03 danstepanov