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]: npx tsc command is failing #415

Closed
2 of 5 tasks
jprado opened this issue Apr 3, 2024 · 0 comments · Fixed by #417
Closed
2 of 5 tasks

[BUG]: npx tsc command is failing #415

jprado opened this issue Apr 3, 2024 · 0 comments · Fixed by #417
Labels
🐛 bug Something isn't working

Comments

@jprado
Copy link

jprado commented Apr 3, 2024

react-native environment setup

  • I verified that I have not react-native-cli installed globally and be up to date about the React Native environment setup.

Description

Problem started since 4.1.0. The template is usable, but the tsc command doesn't run.

➜  boilerplate npx react-native@latest init MyApp --template @thecodingmachine/[email protected]

               ######                ######
             ###     ####        ####     ###
            ##          ###    ###          ##
            ##             ####             ##
            ##             ####             ##
            ##           ##    ##           ##
            ##         ###      ###         ##
             ##  ########################  ##
          ######    ###            ###    ######
      ###     ##    ##              ##    ##     ###
   ###         ## ###      ####      ### ##         ###
  ##           ####      ########      ####           ##
 ##             ###     ##########     ###             ##
  ##           ####      ########      ####           ##
   ###         ## ###      ####      ### ##         ###
      ###     ##    ##              ##    ##     ###
          ######    ###            ###    ######
             ##  ########################  ##
            ##         ###      ###         ##
            ##           ##    ##           ##
            ##             ####             ##
            ##             ####             ##
            ##          ###    ###          ##
             ###     ####        ####     ###
               ######                ######


                  Welcome to React Native!
                 Learn once, write anywhere

✔ Downloading template
✔ Copying template
ℹ Executing post init script
✔ 📘 Using typescript ? … no


📦 Loading the build tool...
warning " > [email protected]" has unmet peer dependency "@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "@babel/plugin-proposal-optional-chaining@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "@babel/plugin-transform-arrow-functions@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "@babel/plugin-transform-shorthand-properties@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "@babel/plugin-transform-template-literals@^7.0.0-0".
warning " > [email protected]" has unmet peer dependency "eslint-plugin-react@^7.28.0".
warning " > [email protected]" has unmet peer dependency "eslint-plugin-react-hooks@^4.3.0".
warning " > [email protected]" has unmet peer dependency "@typescript-eslint/eslint-plugin@^5.13.0 || ^6.0.0".
🧱 Building the javascript source...
node:internal/errors:984
  const err = new Error(message);
              ^

Error: Command failed: npx tsc --jsx react-native --module ESNext -t esnext --outDir js --noEmit false
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at checkExecSyncError (node:child_process:890:11)
    at execSync (node:child_process:962:15)
    at /private/var/folders/rl/p23l_w7x4rgd1vscvwk_cc0h0000gn/T/rncli-init-template-HBormG/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/compile-js/plugin.js:53:5
    at new Promise (<anonymous>)
    at Object.apply (/private/var/folders/rl/p23l_w7x4rgd1vscvwk_cc0h0000gn/T/rncli-init-template-HBormG/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/compile-js/plugin.js:29:10)
    at applyPlugin (/private/var/folders/rl/p23l_w7x4rgd1vscvwk_cc0h0000gn/T/rncli-init-template-HBormG/node_modules/@thecodingmachine/react-native-boilerplate/template/plugins/index.js:28:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  status: 2,
  signal: null,
  output: [
    null,
    Buffer(121) [Uint8Array] [
      101, 114, 114, 111, 114,  32,  84,  83,  53,  48,  57,  54,
       58,  32,  79, 112, 116, 105, 111, 110,  32,  39,  97, 108,
      108, 111, 119,  73, 109, 112, 111, 114, 116, 105, 110, 103,
       84, 115,  69, 120, 116, 101, 110, 115, 105, 111, 110, 115,
       39,  32,  99,  97, 110,  32, 111, 110, 108, 121,  32,  98,
      101,  32, 117, 115, 101, 100,  32, 119, 104, 101, 110,  32,
      101, 105, 116, 104, 101, 114,  32,  39, 110, 111,  69, 109,
      105, 116,  39,  32, 111, 114,  32,  39, 101, 109, 105, 116,
       68, 101,  99, 108,
      ... 21 more items
    ],
    Buffer(0) [Uint8Array] []
  ],
  pid: 88685,
  stdout: Buffer(121) [Uint8Array] [
    101, 114, 114, 111, 114,  32,  84,  83,  53,  48,  57,  54,
     58,  32,  79, 112, 116, 105, 111, 110,  32,  39,  97, 108,
    108, 111, 119,  73, 109, 112, 111, 114, 116, 105, 110, 103,
     84, 115,  69, 120, 116, 101, 110, 115, 105, 111, 110, 115,
     39,  32,  99,  97, 110,  32, 111, 110, 108, 121,  32,  98,
    101,  32, 117, 115, 101, 100,  32, 119, 104, 101, 110,  32,
    101, 105, 116, 104, 101, 114,  32,  39, 110, 111,  69, 109,
    105, 116,  39,  32, 111, 114,  32,  39, 101, 109, 105, 116,
     68, 101,  99, 108,
    ... 21 more items
  ],
  stderr: Buffer(0) [Uint8Array] []
}

Node.js v21.7.1
error Installing pods failed. This doesn't affect project initialization and you can safely proceed.
However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section.

✖ Processing template


info 💡 To enable automatic CocoaPods installation when building for iOS you can create react-native.config.js with automaticPodsInstallation field.
For more details, see https://github.com/react-native-community/cli/blob/main/docs/projects.md#projectiosautomaticpodsinstallation

✔ Initializing Git repository


  Run instructions for Android:
    • Have an Android emulator running (quickest way to get started), or a device connected.
    • cd "/Users/XXXXX/Sync/dev/mobile/boilerplate/MyApp" && npx react-native run-android

  Run instructions for iOS:
    • cd "/Users/XXXXX/Sync/dev/mobile/boilerplate/MyApp/ios"

    • Install Cocoapods
      • bundle install # you need to run this only once in your project.
      • bundle exec pod install
      • cd ..

    • npx react-native run-ios
    - or -
    • Open MyApp/ios/MyApp.xcworkspace in Xcode or run "xed -b ios"
    • Hit the Run button

  Run instructions for macOS:
    • See https://aka.ms/ReactNativeGuideMacOS for the latest up-to-date instructions.

Version

4.1.0 and 4.1.1

Do you use TypeScript?

  • Yes
  • No

On which OS this issue appear on?

  • IOS
  • Android

Desktop OS

macOS 14.4.1 (23E224)

@jprado jprado added the 🐛 bug Something isn't working label Apr 3, 2024
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
1 participant