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.59k stars 85 forks source link

Error installing dependencies after running create-expo-stack #419

Closed natedevxyz closed 1 month ago

natedevxyz commented 1 month ago

Expected Behavior

The "installing dependencies using npm..." step should complete without issues.

Current Behavior

The process is canceled due to the following error:

Error installing dependencies: {"stdout":null,"status":127,"error":null}
failed to run command: cd calm-jar && npm install --silent --no-audit --progress=false

Possible Solution

I received several warnings regarding Babel plugins: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained."

Steps to Reproduce

  1. Run npx create-expo-stack@latest.
  2. The process is canceled due to the error.
  3. Navigate to the project folder.
  4. Try to run npm install.
  5. The following error occurs with the path "node_modules/babel-plugin-react-compiler": sh: ./scripts/link-react-compiler-runtime.sh: No such file or directory

CES Config File

{
  "cesVersion": "2.11.24",
  "projectName": "calm-jar",
  "packages": [
    {
      "name": "expo-router",
      "type": "navigation",
      "options": {
        "type": "stack"
      }
    },
    {
      "name": "nativewind",
      "type": "styling"
    }
  ],
  "flags": {
    "noGit": false,
    "noInstall": false,
    "overwrite": false,
    "importAlias": true,
    "packageManager": "npm",
    "eas": false
  },
  "packageManager": {
    "type": "npm",
    "version": "10.9.0"
  },
  "os": {
    "type": "Darwin",
    "platform": "darwin",
    "arch": "arm64",
    "kernelVersion": "24.0.0"
  }
}
mozart25 commented 1 month ago

same. even npx create-exp-app error

dannyhw commented 1 month ago

seems related to this issue on expo

https://github.com/expo/expo/issues/31912

I can look into applying the fix in our templates

the fix is:

babel-preset-expo is a dependency of expo and, preferably, should not be installed directly in your project. However, you can force-update your lockfile by running npm i --save babel-preset-expo@11.0.15 - and then removing this package again. npm's optimization should update the dependency chain expo@51 -> babel-preset-expo@11.0.15 by doing so.

natedevxyz commented 1 month ago

seems related to this issue on expo

expo/expo#31912

I can look into applying the fix in our templates

the fix is:

babel-preset-expo is a dependency of expo and, preferably, should not be installed directly in your project. However, you can force-update your lockfile by running npm i --save babel-preset-expo@11.0.15 - and then removing this package again. npm's optimization should update the dependency chain expo@51 -> babel-preset-expo@11.0.15 by doing so.

thank you, a hotfix for babel-plugin-react-compiler was released, it's working now