react-native-community / react-native-template-typescript

👾 Clean and minimalist React Native template for a quick start with TypeScript.
https://www.npmjs.com/package/react-native-template-typescript
MIT License
1.86k stars 398 forks source link

New template fails to build #185

Closed alechko closed 3 years ago

alechko commented 3 years ago

Expected results

What did you expect to happen?

Running yarn ios or npx react-native run-ios should start the project in a simulator or a device

Observed results

What happened?

The project fails to build.

Logs

Please add the log output here.

running npx react-native run-ios result:

** BUILD FAILED **

The following build commands failed:
    CompileC /Users/alex/Library/Developer/Xcode/DerivedData/projectts-bzoxazmvarpzwpdwehbkjxzpyrgy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-CoreModules.build/Objects-normal/x86_64/RCTAlertController.o /Users/alex/dev/reactnative/projectts/node_modules/react-native/React/CoreModules/RCTAlertController.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

npm ERR! code 1
npm ERR! path /Users/alex/dev/reactnative/projectts
npm ERR! command failed
npm ERR! command sh -c react-native "run-ios"

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alex/.npm/_logs/2021-02-21T13_20_06_346Z-debug.log

debug.log contents:

0 verbose cli [
0 verbose cli   '/usr/local/Cellar/node/15.9.0/bin/node',
0 verbose cli   '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli   'exec',
0 verbose cli   '--',
0 verbose cli   'react-native',
0 verbose cli   'run-ios'
0 verbose cli ]
1 info using npm@7.5.3
2 info using node@v15.9.0
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 2ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/Users/alex/dev/reactnative/projectts/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/Users/alex/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 verbose npm-session 8d715ea667374ea9
20 timing npm:load Completed in 18ms
21 timing command:exec Completed in 8466ms
22 verbose stack Error: command failed
22 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
22 verbose stack     at ChildProcess.emit (node:events:378:20)
22 verbose stack     at maybeClose (node:internal/child_process:1067:16)
22 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
23 verbose pkgid projectts@0.0.1
24 verbose cwd /Users/alex/dev/reactnative/projectts
25 verbose Darwin 20.3.0
26 verbose argv "/usr/local/Cellar/node/15.9.0/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "react-native" "run-ios"
27 verbose node v15.9.0
28 verbose npm  v7.5.3
29 error code 1
30 error path /Users/alex/dev/reactnative/projectts
31 error command failed
32 error command sh -c react-native "run-ios"
33 verbose exit 1

Steps to reproduce

  1. run npx --ignore-existing react-native init projectts --template react-native-template-typescript
  2. run cd projectts && npx react-native run-ios
alechko commented 3 years ago

I've managed to resolve this issue, it was not related to this template but to Flipper. I've had 0.69 version installed, and after using use_flipper!({ 'Flipper-Folly' => '2.3.0' }) it was working. So I upgraded Flipper and reverted to use_flipper! the build was successful.

ghost commented 3 years ago

i fiexd , https://github.com/reactnativecn/react-native-website/issues/370#issuecomment-773820385