text:
Build fails after enabling new architecture

Description
PS D:\exp\AwesomeTSProject> yarn android
yarn run v1.22.17
$ react-native run-android
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...

> Task :ReactAndroid:downloadBoost
Download https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz

> Task :ReactAndroid:downloadGlog
Download https://github.com/google/glog/archive/v0.3.5.tar.gz

> Task :ReactAndroid:downloadDoubleConversion
Download https://github.com/google/double-conversion/archive/v1.1.6.tar.gz

> Task :ReactAndroid:prepareGlog
Encountered duplicate path "config.h" during copy operation configured with DuplicatesStrategy.WARN

> Task :ReactAndroid:downloadFmt
Download https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz

> Task :ReactAndroid:downloadFolly
Download https://github.com/facebook/folly/archive/v2021.07.22.00.tar.gz

> Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7

> Task :ReactAndroid:downloadLibevent
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

> Task :ReactAndroid:hermes-engine:configureBuildForHermes
-- Building for: NMake Makefiles
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx86/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: C:/Python310/python.exe (found version "3.10.5") found components: Interpreter
-- Performing Test HAVE_COMPUTED_GOTO
-- Performing Test HAVE_COMPUTED_GOTO - Failed
-- Performing Test HAVE_GC_SECTIONS
-- Performing Test HAVE_GC_SECTIONS - Failed
-- Performing Test HAVE_ICF
-- Performing Test HAVE_ICF - Failed
-- Found the following ICU libraries:
--   uc (required)
--   i18n (required)
--   uc (required)
-- The following ICU libraries were not found:
--   data (required)
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR _ICU_REQUIRED_LIBS_FOUND) (Required is at least version "52")
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for termios.h
-- Looking for termios.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - not found
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - not found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for getrusage
-- Looking for getrusage - not found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for isatty
-- Looking for isatty - not found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - not found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - not found
-- Looking for sigaltstack
-- Looking for sigaltstack - not found
-- Looking for lseek64
-- Looking for lseek64 - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for posix_spawn
-- Looking for posix_spawn - not found
-- Looking for pread
-- Looking for pread - not found
-- Looking for realpath
-- Looking for realpath - not found
-- Looking for sbrk
-- Looking for sbrk - not found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for strerror_s
-- Looking for strerror_s - found
-- Looking for setenv
-- Looking for setenv - not found
-- Looking for _chsize_s
-- Looking for _chsize_s - found
-- Looking for _alloca
-- Looking for _alloca - not found
-- Looking for __alloca
-- Looking for __alloca - not found
-- Looking for __chkstk
-- Looking for __chkstk - not found
-- Looking for __chkstk_ms
-- Looking for __chkstk_ms - not found
-- Looking for ___chkstk
-- Looking for ___chkstk - not found
-- Looking for ___chkstk_ms
-- Looking for ___chkstk_ms - not found
-- Looking for __ashldi3
-- Looking for __ashldi3 - not found
-- Looking for __ashrdi3
-- Looking for __ashrdi3 - not found
-- Looking for __divdi3
-- Looking for __divdi3 - not found
-- Looking for __fixdfdi
-- Looking for __fixdfdi - not found
-- Looking for __fixsfdi
-- Looking for __fixsfdi - not found
-- Looking for __floatdidf
-- Looking for __floatdidf - not found
-- Looking for __lshrdi3
-- Looking for __lshrdi3 - not found
-- Looking for __moddi3
-- Looking for __moddi3 - not found
-- Looking for __udivdi3
-- Looking for __udivdi3 - not found
-- Looking for __umoddi3
-- Looking for __umoddi3 - not found
-- Looking for __main
-- Looking for __main - not found
-- Looking for __cmpdi2
-- Looking for __cmpdi2 - not found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Looking for sched_getaffinity
-- Looking for sched_getaffinity - not found
-- Looking for CPU_COUNT
-- Looking for CPU_COUNT - not found
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_NO_PIE_FLAG
-- Performing Test SUPPORTS_NO_PIE_FLAG - Failed
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Failed
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- CMAKE_HOST_SYSTEM_NAME = Windows
-- CMAKE_SYSTEM_NAME = Windows
-- HERMES_APPLE_TARGET_PLATFORM =
-- CMAKE_CROSSCOMPILING = FALSE
-- Looking for readline
-- Looking for readline - not found
-- Configuring done
-- Generating done
-- Build files have been written to: D:/exp/AwesomeTSProject/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes

> Task :ReactAndroid:hermes-engine:buildHermes
Scanning dependencies of target LLVHDemangle
[  0%] Building CXX object external/llvh/lib/Demangle/CMakeFiles/LLVHDemangle.dir/ItaniumDemangle.cpp.obj
ItaniumDemangle.cpp
[  0%] Building CXX object external/llvh/lib/Demangle/CMakeFiles/LLVHDemangle.dir/MicrosoftDemangle.cpp.obj
MicrosoftDemangle.cpp
[  0%] Building CXX object external/llvh/lib/Demangle/CMakeFiles/LLVHDemangle.dir/MicrosoftDemangleNodes.cpp.obj
MicrosoftDemangleNodes.cpp
[  3%] Linking CXX static library LLVHDemangle.lib
[  3%] Built target LLVHDemangle
Scanning dependencies of target LLVHSupport
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/APFloat.cpp.obj
APFloat.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/APInt.cpp.obj
APInt.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/circular_raw_ostream.cpp.obj
circular_raw_ostream.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/CommandLine.cpp.obj
CommandLine.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/ConvertUTF.cpp.obj
ConvertUTF.cpp
...........
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/StringKind.cpp.obj
StringKind.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/TraverseLiteralStrings.cpp.obj
TraverseLiteralStrings.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/UniquingFilenameTable.cpp.obj
UniquingFilenameTable.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/UniquingStringLiteralTable.cpp.obj
UniquingStringLiteralTable.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/FuncCallNOpts.cpp.obj
FuncCallNOpts.cpp
[ 93%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/InsertProfilePoint.cpp.obj
InsertProfilePoint.cpp
[ 93%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/LowerBuiltinCalls.cpp.obj
LowerBuiltinCalls.cpp
[ 93%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/OptEnvironmentInit.cpp.obj
OptEnvironmentInit.cpp
[ 93%] Linking CXX static library hermesHBCBackend.lib
[ 93%] Built target hermesHBCBackend
Scanning dependencies of target zip
[ 93%] Building C object external/zip/CMakeFiles/zip.dir/src/zip.c.obj
zip.c
[ 96%] Linking C static library zip.lib
[ 96%] Built target zip
Scanning dependencies of target hermesCompilerDriver
[100%] Building CXX object lib/CompilerDriver/CMakeFiles/hermesCompilerDriver.dir/CompilerDriver.cpp.obj
CompilerDriver.cpp
[100%] Linking CXX static library hermesCompilerDriver.lib
[100%] Built target hermesCompilerDriver
Scanning dependencies of target hermesc
[100%] Building CXX object tools/hermesc/CMakeFiles/hermesc.dir/hermesc.cpp.obj
hermesc.cpp
[100%] Linking CXX executable ..\..\bin\hermesc.exe
[100%] Built target hermesc

> Task :ReactAndroid:configureCMakeDebug[arm64-v8a]
C/C++: debug|arm64-v8a :CMake Warning in D:/exp/AwesomeTSProject/node_modules/react-native/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt:
C/C++: debug|arm64-v8a :  The object file directory
C/C++: debug|arm64-v8a :    D:/exp/AwesomeTSProject/node_modules/react-native/ReactAndroid/.cxx/Debug/o4v1s5x3/arm64-v8a/ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/./
C/C++: debug|arm64-v8a :  has 176 characters.  The maximum full path to an object file is 250
C/C++: debug|arm64-v8a :  characters (see CMAKE_OBJECT_PATH_MAX).  Object file
C/C++: debug|arm64-v8a :    android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o
C/C++: debug|arm64-v8a :  cannot be safely placed under this directory.  The build may not work
C/C++: debug|arm64-v8a :  correctly.

> Task :ReactAndroid:hermes-engine:buildCMakeRelease[arm64-v8a][libhermes]
....

> Task :ReactAndroid:downloadLibevent UP-TO-DATE
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

> Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7

> Task :ReactAndroid:hermes-engine:configureBuildForHermes
-- Found the following ICU libraries:
--   uc (required)
--   i18n (required)
--   uc (required)
-- The following ICU libraries were not found:
--   data (required)
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR _ICU_REQUIRED_LIBS_FOUND) (Required is at least version "52")
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- CMAKE_HOST_SYSTEM_NAME = Windows
-- CMAKE_SYSTEM_NAME = Windows
-- HERMES_APPLE_TARGET_PLATFORM =
-- CMAKE_CROSSCOMPILING = FALSE
-- Configuring done
-- Generating done
-- Build files have been written to: D:/exp/AwesomeTSProject/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes

> Task :ReactAndroid:hermes-engine:buildHermes
[  3%] Built target LLVHDemangle
.....
[100%] Built target hermesc

> Task :ReactAndroid:hermes-engine:buildCMakeRelease[x86][libhermes]
C/C++: ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\.cxx\Release\614a206x\x86'
C/C++: D:/exp/AwesomeTSProject/node_modules/react-native/sdks/hermes/lib/VM/JSLib/TypedArray.cpp:412:22: warning: unused variable 'noAllocs' [-Wunused-variable]
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.

> Task :ReactAndroid:hermes-engine:buildCMakeRelease[x86_64][libhermes]
C/C++: CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
C/C++:   The OLD behavior for policy CMP0026 will be removed from a future version
C/C++:   of CMake.
C/C++:   The cmake-policies(7) manual explains that the OLD behaviors of all
C/C++:   policies are deprecated and that a policy should be set to OLD only under
C/C++:   specific short-term circumstances.  Projects should be ported to the NEW
C/C++:   behavior and not rely on setting a policy to OLD.
C/C++: CMake Warning at external/llvh/cmake/modules/GetHostTriple.cmake:18 (message):
C/C++:   LLVM_HOST_TRIPLE can't be computed on Windows with this toolchain
C/C++: Call Stack (most recent call first):
C/C++:   external/llvh/cmake/config-ix.cmake:360 (get_host_triple)
C/C++:   external/llvh/CMakeLists.txt:21 (include)
C/C++: ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\.cxx\Release\614a206x\x86_64'
C/C++: D:/exp/AwesomeTSProject/node_modules/react-native/sdks/hermes/lib/VM/JSLib/TypedArray.cpp:412:22: warning: unused variable 'noAllocs' [-Wunused-variable]
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.

> Task :ReactAndroid:hermes-engine:externalNativeBuildDebug
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.armeabi-v7a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.armeabi-v7a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.arm64-v8a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.arm64-v8a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\arm-linux-androideabi\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\arm-linux-androideabi\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.

> Task :ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc] FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
39 actionable tasks: 14 executed, 25 up-to-date
CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

Using Windows 10 built-in ICU
Warning: NMake does not support parallel builds. Ignoring parallel build command line option.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc]'.
> Build command failed.
  Error while executing process C:\Users\mak13\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a fabricjni hermes-executor-debug jscexecutor jsijniprofiler reactnativeblob reactnativejni reactperfloggerjni turbomodulejsijni}
  ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/422] Building ASM object build/third-party-ndk/boost/CMakeFiles/boost.dir/asm/arm64-v8a/ontop_arm64_aapcs_elf_gas.S.o
  .....
  C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ar.exe: ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o: No such file or directory
  [417/422] Linking CXX static library ReactCommon\react\renderer\components\switch\librrc_switch.a
  [418/422] Linking CXX static library ReactCommon\react\renderer\components\modal\librrc_modal.a
  [419/422] Linking CXX static library ReactCommon\react\renderer\components\slider\librrc_slider.a
  [420/422] Linking CXX shared library D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\o4v1s5x3\obj\arm64-v8a\libhermes-executor-debug.so
  [421/422] Building CXX object ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CMakeFiles/fabricjni.dir/CoreComponentsRegistry.cpp.o
  ninja: build stopped: subcommand failed.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 23m 54s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

Using Windows 10 built-in ICU
Warning: NMake does not support parallel builds. Ignoring parallel build command line option.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc]'.
> Build command failed.
  Error while executing process C:\Users\mak13\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a fabricjni hermes-executor-debug jscexecutor jsijniprofiler reactnativeblob reactnativejni reactperfloggerjni turbomodulejsijni}
  ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a'
  [0/2] Re-checking globbed directories...
 ....
ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CMakeFiles/fabricjni.dir/CoreComponentsRegistry.cpp.o
  ninja: build stopped: subcommand failed.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 23m 54s

    at makeError (D:\exp\AwesomeTSProject\node_modules\execa\index.js:174:9)
    at D:\exp\AwesomeTSProject\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (D:\exp\AwesomeTSProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (D:\exp\AwesomeTSProject\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Version
0.70.4
Output of npx react-native info
System:
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
Memory: 9.36 GB / 23.85 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Watchman: 20210110.135312.0 - C:\ProgramData\chocolatey\bin\watchman.EXE
SDKs:
Android SDK:
API Levels: 27, 28, 29, 30, 31, 32, 33
Build Tools: 27.0.1, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0
System Images: android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64
Android NDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.19041.0, 10.0.22621.0
IDEs:
Android Studio: Version     2020.3.0.0 AI-203.7717.56.2031.7678000
Visual Studio: 17.3.32922.545 (Visual Studio Community 2022)
Languages:
Java: 1.8.0_302 - C:\Program Files\OpenJDK\openjdk-8u302-b08\bin\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.2 => 0.70.2
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Install using npx react-native init AwesomeTSProject --template react-native-template-typescript
Enable the new architecture by setting newArchEnabled=true in build.properties
cd android
./gradlew clean
cd ..
yarn android  (in visual studio powershell)
Snack, code example, screenshot, or link to a repository
I haven't changed any piece of code in js. Just a simple install and run.

react-native: 0.70.2 => 0.70.2

You should update to 0.70.3 as we fixed this specific Windows issue in this version

I tried running it with 0.70.3 , which again failed , but 0.70.4 runs successfully . Thank you.


text:
Permission is null issue in android 12

Description
Hello team,
According to android api leavel 31 I have updated code. before I am trying to enable bluetooth using PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION). for android 12 I have tried with multiple request like this const granted = await PermissionsAndroid.requestMultiple([ PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN, PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT]);.
I am getting error on only on android 12
React Native Version
0.64.2
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.4
CPU: (8) arm64 Apple M2
Memory: 39.41 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.1.0 - /opt/homebrew/bin/node
Yarn: Not Found
npm: 8.19.4 - ~/Desktop/Ravindra/All_apps/My_player_perks/node_modules/.bin/npm
Watchman: 2023.03.20.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /Users/macmini/.rvm/rubies/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK:
API Levels: 23, 27, 28, 29, 30, 31, 33, 33
Build Tools: 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 33.0.2
System Images: android-31 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.2 => 0.64.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
add bluetooth permission in android manifest file and try BleManager.enableBluetooth() it throws error on andorid 12 only
Snack, code example, screenshot, or link to a repository
Error is :

Code :
Old code that not compatible with android 12

Old AndroidManifest.xml

Android/build.gradle

Versions :

After I updating this code for android 12 I got Permission is null Error

Updated AndroidManifest.xml

please let me know what I am missing, what i need to update or upgrade

This issue still persists on react-native 0.64.2, when trying to check PermissionsAndroid.PERMISSIONS.READ_MEDIA_IMAGES and PermissionsAndroid.PERMISSIONS.READ_MEDIA_VIDEO

source: gharchive/issue

repo: facebook/react-native

license: MIT

license_type: permissive

license_source: github-api


text:
watchman issue - xcode build fails

Here's my environment - started from scratch.
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.5
BuildVersion:	14F1021

$ nvm list
->       v4.2.2
         v5.0.0
default -> 4.2.2 (-> v4.2.2)
stable -> 4.2.2 (-> v4.2.2)
node -> stable (-> v4.2.2) (default)
iojs -> N/A (default)

$ node -v
v4.2.2

$ npm -v
2.14.7

$ brew info watchman
watchman: stable 4.1.0 (bottled), HEAD
Watch files and take action when they change
https://github.com/facebook/watchman
/usr/local/Cellar/watchman/HEAD (25 files, 368K) *
  Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/watchman.rb
==> Dependencies
Build: autoconf ✔, automake ✔
Required: pcre ✔

After I create a fresh project
$ npm install -g react-native-cli
$ react-native init ss
$ cd ss
$ open ios/ss.xcodeproject

xcode fails to build with the following error
 ┌────────────────────────────────────────────────────────────────────────────┐
 │  Running packager on port 8081.                                            │
 │                                                                            │
 │  Keep this packager running while developing on any JS projects. Feel      │
 │  free to close this tab and run your own packager instance if you          │
 │  prefer.                                                                   │
 │                                                                            │
 │  https://github.com/facebook/react-native                                  │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
   /Users/amitava/Projects/react/ss

[10:18:49 AM] <START> Building Dependency Graph
[10:18:49 AM] <START> Crawling File System
[10:18:49 AM] <START> Loading bundles layout
[10:18:49 AM] <END>   Loading bundles layout (0ms)

React packager ready.

Error building DepdendencyGraph:
 Error: failed to parse query: must use ["allof", expr...]
    at BunserBuf.<anonymous> (/Users/amitava/Projects/react/ss/node_modules/react-native/node_modules/sane/node_modules/fb-watchman/index.js:93:23)
    at emitOne (events.js:77:13)
    at BunserBuf.emit (events.js:169:7)
    at BunserBuf.process (/Users/amitava/Projects/react/ss/node_modules/react-native/node_modules/bser/index.js:289:10)
    at /Users/amitava/Projects/react/ss/node_modules/react-native/node_modules/bser/index.js:244:12
    at doNTCallback0 (node.js:419:9)
    at process._tickCallback (node.js:348:13)
Process terminated. Press <enter> to close the window

Seems related to https://github.com/facebook/watchman/issues/118

https://github.com/facebook/watchman/issues/118 - not a watchman issue. This seems to be a react-native issue. Any workarounds?

@ashee Were you able to find a solution?

cc @amasad @martinbigio - from discussion on https://github.com/facebook/watchman/issues/118 seems like the packager sends an invalid query to the watchman, could you please check if it's a packager or sane's problem?

@amasad could you point me to where the query is generated? couldn't find out (checked FileWatcher and fastfs) and I'm not very familiar with this part of the codebase.

@martinbigio the query is generated here: https://github.com/facebook/react-native/blob/master/packager/react-packager/src/DependencyResolver/crawlers/watchman.js#L40-L44

Closing this out due to inactivity. Feel free to reopen if the issue persists!

In case anyone is still seeing this issue. I was getting:
Failed to build DependencyGraph: Watchman error: failed to parse query: must use ["allof", expr...]. Make sure watchman
is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
Error: Watchman error: failed to parse query: must use ["allof", expr...]. Make sure watchman is running for this projec
t. See https://facebook.github.io/watchman/docs/troubleshooting.html.
    at c:\Users\dojiboy9\my-app\src\mobile\node_modules\react-native\node_modules\node-haste\lib\crawlers\watchman.js:63:11
    at process._tickCallback (node.js:377:9)

In my case it was indeed the invalid query (there is an empty ['anyof'] expression). I added a work-around in this gist

Just started happening with RN 0.33.0

For me, I had a package that did require('retry') when I had renamed the dependency to Retry.
So, while Watchman resolved watchedRoot into the correct casing, the roots array still contained the invalid, lowercase retry path.
This led to isDescendant(watchedRoot, roots[i]) never passing, resulting in dirExpr.length === 1 (which is not allowed in Watchman currently).

authors: aleclarson amasad ashee braco christopherdro dojiboy9 frantic jsierles martinbigio


text:
Doc description of React Navigation ease of use

The guide describes React Navigation as the most "easy" solution to navigation when it would be more accurate and helpful to instead describe it as the most stable.

Motivation
(Write your motivation here.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Release Notes

The docs are no longer stored in this repository. See https://github.com/facebook/react-native-website

source: gharchive/pull-request

authors: hramos johngoren


text:
[react-packager] Add package to file redirection support.

According to the browser field spec for package.json, bundler should support redirect a module to a specific file.
"browser": {
    "module-a": "./shims/module-a.js",
}

fix #2459.

thank you for including tests!

This patch should work fine with standard node modules. But when comes with a non-standard module (like this), it breaks the test. I believe that is because this promise never resolve or reject. After couple of hours on "how to debug a pending promise in jest", I gave up trying to make it work for non-standard module.
@amasad would you please review this PR, thanks.

hmmm.... I thought we did support that.
Thanks for your contribution. We're actually in the process of moving the packager to it's own github repo and we'll be able to accept contributions like this much faster (we can just use the Github merge button). I'm hoping we can release it some time this week, and I'll take a deeper look at this.

Any update on this issue?

@AaaChiuuu would you mind taking a look at this pull request? It's been a while since the last commit was reviewed.

@leeyeh The packager stays in the React Native repo. Sorry this got dropped. Do you want to rebase this to continue working on it?
@ide Is this PR still relevant given how the packager codebase changed?

I believe it's still relevant but maybe the react-native field in package.json implements this behavior. I'm not sure as I haven't used it, but the idea is it lets you override dependencies for your app.

the react-native field in package.json implements this behavior.

Indeed.

Thanks for following up and confirming =)

authors: amasad facebook-github-bot-3 ide leeyeh mkonicek siuying


text:
cleanup DrawerLayoutAndroid

Summary
This PR removes Java reflection use in ReactDrawerLayoutManager.java because we all use AndroidX and setDrawerElevation is available. Also adds NonNull annotations
Changelog
[Android] [Changed] - cleanup DrawerLayoutAndroid
Test Plan
RNTester is working as expected.

cc @makovkastar since you have a diff changing this file too

authors: TheSavior dulmandakh


text:
Regex update and version bump 0.63

Summary:
I'm currently using this version on a project, I sending this pull request to update the regex for 0.63 to avoid a potential regular expression denial-of-service vulnerability.
Changelog
Update validateBaseUrl to use a more robust regular expression. Fixes CVE-2020-1920, GHSL-2020-293

I'm currently using this version on a project, I sending this pull request to update the regex for 0.63 to avoid a potential regular expression denial-of-service vulnerability.

I think you ended up picking too many commits?

Sorry, I selected main instead of 0.63-stable

authors: claysimps cortinico


text:
Fix windowed rendering when scrolling to index 0 in a VirtualizedList with non-zero initialScrollIndex

Summary
Currently the following behaviour exists:
If

A VirtualizedList is rendered with a non-zero initialScrollIndex value and
The element at index 0 is not in the rendered window and
The scrollToIndex or scrollToOffset methods are used to navigate to index 0

Then the windowed rendering will not recompute correctly and the elements in the window of index 0 will not get rendered (with blank cells shown instead) until the user starts scrolling the list manually.
This PR fixes this edge case without interfering with any other behaviour of VirtualizedList.
Changelog
[General] [Fixed] - Fix windowed rendering when scrolling to index 0 in a VirtualizedList with non-zero initialScrollIndex
Test Plan
Tested this change heavily in my private code base and have been using it in production for months beneath a number of VirtualizedLists and FlatLists. Problem can be reproduced and then fix confirmed by rendering a large VirtualizedList with an initialScrollIndex that puts index 0 outside the render window and then calling listRef.current.scrollToIndex({animated: false, index: 0, viewPosition: 0}).
The following videos are taken from my app and demonstrate a large horizontal VirtualizedList with each item having the same fixed layout with width matching the width of the screen. In each video, the list has been rendered with a window size of 3 and an initial scroll index of 563. I use a menu in the app to navigate to page 1 (index 0). Before this change, the page (item) is not rendered until I start to manually scroll the list. After this change, the item at index 0 is rendered correctly without any manual intervention.
Before:
https://user-images.githubusercontent.com/9062287/159818718-e19c2610-1fea-46a1-ab70-4958b7635085.mov
After:
https://user-images.githubusercontent.com/9062287/159818049-24e77544-4b7c-4ebe-9dc0-a5e6ca101c67.mov

Thanks for this contribution, @mmmoussa. Could you get the tests fixed up?

authors: charlesbdudley mmmoussa


text:
edited the parser and define the function

Summary
This is for issue https://github.com/facebook/react-native/issues/34872 but the subtask where you have to define functionTypeAnnotation in the parser.js file and document it. In addition, I had to implement a certain logic in the flowparser.js and typescriptparser.js. Lastly, I would have to refactor the throwIfModuleTypeIsUnsupported function to accept a parser instead of a parsertype and use the newly created function instead of the if (language) logic.
Changelog:
Javascript Fixed - fixed both the flowparser.js and typescriptparser.js to implement the specific logic that is needed.
Test Plan:
I used the test plan that was stated in the issue, which was yarn jest react-native-codegen
Questions:
I am doing this for my assignment but I do want to know why my code isn't passing and if you can give me any tips, it will be greatly appreciated.

@kylemacabasco can you look into the Danger failure and the CI failures as well? We need everything to be green before we can look into this 👍

any updates on this @kylemacabasco?

Closing this as the author is not responsive

authors: cipolleschi cortinico gabrieldonadel kylemacabasco


text:
[Codegen 93] Move getOptions to parsers commons

Summary

[Codegen 93] The getOptions function in parsers/typescript/components/options.js and parsers/flow/components/options.js is the same. move it in parser-commons and use it in the original files. If the file two options.js files are empty, delete them.

Part of Issue #34872
Changelog

[Internal][Changed] - Move getOptions to parsers commons from parsers components options
Test Plan

yarn jest react-native-codegen

/rebase

/rebase

/rebase

authors: cipolleschi tarunrajput


text:
onScrollAnimationEnd > onmomentumScrollEnd

As per https://github.com/facebook/react-native/issues/1410#issuecomment-105668129

This is a different event. Can you add onMomentumScrollBegin/End as separate propTypes?

@brentvatne Looks like you have context - can you review this please?

Hey @irfaan! Thanks for making the pull request, but we are closing it due to inactivity (74 days with no activity) to make sure all pull requests are either being worked on or closed. If you want to get your proposed changes merged, please rebase your branch with master and send a new pull request :)
Based one the comment above:

This is a different event. Can you add onMomentumScrollBegin/End as separate propTypes?

Why close this? The doc is still incorrect. @mkonicek @ide

authors: ide irfaan mkonicek sunnylqm


text:
Stetho throws Fatal Exception

Stetho is throwing following exception
 FATAL EXCEPTION: StethoWorker-main-22                                                    java.lang.NoClassDefFoundError: javax/annotation/Nonnull                                                        at java.lang.reflect.Method.isAnnotationPresent(Native Method)                                                        at java.lang.reflect.Method.isAnnotationPresent(Method.java:284)                                                        at com.facebook.stetho.inspector.MethodDispatcher.isDevtoolsMethod(MethodDispatcher.java:136)                                                        at com.facebook.stetho.inspector.MethodDispatcher.buildDispatchTable(MethodDispatcher.java:116)                                                        at com.facebook.stetho.inspector.MethodDispatcher.findMethodDispatcher(MethodDispatcher.java:53)                                                        at com.facebook.stetho.inspector.MethodDispatcher.dispatch(MethodDispatcher.java:60)                                                        at com.facebook.stetho.inspector.ChromeDevtoolsServer.handleRemoteRequest(ChromeDevtoolsServer.java:129)                                                        at com.facebook.stetho.inspector.ChromeDevtoolsServer.handleRemoteMessage(ChromeDevtoolsServer.java:111)                                                        at com.facebook.stetho.inspector.ChromeDevtoolsServer.onMessage(ChromeDevtoolsServer.java:87)                                                        at com.facebook.stetho.websocket.WebSocketSession$1.handleTextFrame(WebSocketSession.java:176)                                                        at com.facebook.stetho.websocket.WebSocketSession$1.onCompleteFrame(WebSocketSession.java:136)                                                        at com.facebook.stetho.websocket.ReadHandler.readLoop(ReadHandler.java:44)                                                        at com.facebook.stetho.websocket.WebSocketSession.handle(WebSocketSession.java:45)                                                        at com.facebook.stetho.websocket.WebSocketHandler.doUpgrade(WebSocketHandler.java:117)                                                        at com.facebook.stetho.websocket.WebSocketHandler.handleRequest(WebSocketHandler.java:83)                                                        at com.facebook.stetho.server.http.LightHttpServer.dispatchToHandler(LightHttpServer.java:84)                                                        at com.facebook.stetho.server.http.LightHttpServer.serve(LightHttpServer.java:61)                                                        at com.facebook.stetho.inspector.DevtoolsSocketHandler.onAccepted(DevtoolsSocketHandler.java:52)                                                        at com.facebook.stetho.server.ProtocolDetectingSocketHandler.onSecured(ProtocolDetectingSocketHandler.java:63)                                                        at com.facebook.stetho.server.SecureSocketHandler.onAccepted(SecureSocketHandler.java:33)                                                        at com.facebook.stetho.server.LazySocketHandler.onAccepted(LazySocketHandler.java:36)                                                        at com.facebook.stetho.server.LocalSocketServer$WorkerThread.run(LocalSocketServer.java:167)                                                     Caused by: java.lang.ClassNotFoundException: javax.annotation.Nonnull                                                        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:501)                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:461)                                                        at java.lang.reflect.Method.isAnnotationPresent(Native Method)                                                         at java.lang.reflect.Method.isAnnotationPresent(Method.java:284)                                                         at com.facebook.stetho.inspector.MethodDispatcher.isDevtoolsMethod(MethodDispatcher.java:136)                                                         at com.facebook.stetho.inspector.MethodDispatcher.buildDispatchTable(MethodDispatcher.java:116)                                                         at com.facebook.stetho.inspector.MethodDispatcher.findMethodDispatcher(MethodDispatcher.java:53)                                                         at com.facebook.stetho.inspector.MethodDispatcher.dispatch(MethodDispatcher.java:60)                                                         at com.facebook.stetho.inspector.ChromeDevtoolsServer.handleRemoteRequest(ChromeDevtoolsServer.java:129)                                                         at com.facebook.stetho.inspector.ChromeDevtoolsServer.handleRemoteMessage(ChromeDevtoolsServer.java:111)                                                         at com.facebook.stetho.inspector.ChromeDevtoolsServer.onMessage(ChromeDevtoolsServer.java:87)                                                         at com.facebook.stetho.websocket.WebSocketSession$1.handleTextFrame(WebSocketSession.java:176)                                                         at com.facebook.stetho.websocket.WebSocketSession$1.onCompleteFrame(WebSocketSession.java:136)                                                         at com.facebook.stetho.websocket.ReadHandler.readLoop(ReadHandler.java:44)                                                         at com.facebook.stetho.websocket.WebSocketSession.handle(WebSocketSession.java:45)                                                         at com.facebook.stetho.websocket.WebSocketHandler.doUpgrade(WebSocketHandler.java:117)                                                         at com.facebook.stetho.websocket.WebSocketHandler.handleRequest(WebSocketHandler.java:83)                                                         at com.facebook.stetho.server.http.LightHttpServer.dispatchToHandler(LightHttpServer.java:84)                                                         at com.facebook.stetho.server.http.LightHttpServer.serve(LightHttpServer.java:61)                                                         at com.facebook.stetho.inspector.DevtoolsSocketHandler.onAccepted(DevtoolsSocketHandler.java:52)                                                         at com.facebook.stetho.server.ProtocolDetectingSocketHandler.onSecured(ProtocolDetectingSocketHandler.java:63)                                                         at com.facebook.stetho.server.SecureSocketHandler.onAccepted(SecureSocketHandler.java:33)                                                         at com.facebook.stetho.server.LazySocketHandler.onAccepted(LazySocketHandler.java:36)                                                         at com.facebook.stetho.server.LocalSocketServer$WorkerThread.run(LocalSocketServer.java:167)

This looks like your proguard rules have not kept @Nonnull in the APK and for some reason isAnnotationPresent(SomeOtherAnnotation.class) is failing because of this.  I believe a simple work around would be to tell proguard to keep javax.annotation.*.  Can you confirm that indeed without proguard in play you don't see this error?

authors: jasta jawadhassan

repo: facebook/stetho

license: mit

license_source: bigquery


text:
Remove the "structs must be final" check. Handle exception subclasses

We have a codebase which (for better or worse) has a bunch of specific subclasses of a more general ServerErrorException @ThriftStruct. Most of our @ThriftMethods are declared as throwing a SEE, but the subclasses are used internally for more precise things. Without some non-trivial codemods to our app, this is I think the best we can do.
The first commit introduces an annotation which bypasses the "struct must be final" check. Using this annotation makes the metadata work, and returning a subclass of a struct would be fine (since the codec used when a method returns successfully is determined by the method's return type and not by its returned object.)
The second commit makes exceptions work. It is necessary because the codec used when a method throws is determined not by the method declaration but by the type of the thrown object.
Both commits are independent, in the sense that the src/main changes apply cleanly in either order. They're in a single PR because it doesn't make sense to have the second commit without the first-- it would add correct but effectively dead code.

For the second part (exceptions): I don't see how this can work as you intend it to.
If a method is declared in the service definition to throw BaseException, and you throw DerivedException, you can change the throwing side (the swift server) to encode the exception based on the type thrown, instead of based on the declared throwable type but:

this is not how thrift is supposed to work, we are supposed to check if the type you threw is any of the exact types declared as throwable
and this is because when the client side tries to deserialized the exception, it will not know to expect a DerivedException, and will deserialize it as BaseException. This will probably succeed, but any fields exclusive to DerivedException fields will just be dropped

For the first part (return values): you even say "the codec used when a method returns successfully is determined by the method's return type and not by its returned object". So what good is it to return a derived type at all?
Not to mention that since we don't support type inheritance in IDL, even if you fixed these issues you'd have a swift interface which could not cleanly translate back into a working interface that non-swift thrift clients could call...

If a method is declared in the service definition to throw BaseException, and you throw DerivedException, you can change the throwing side (the swift server) to encode the exception based on the type thrown, instead of based on the declared throwable type but:

That's not what this does. The codec used to encode the exception is still chosen from one of the declared throwable types; this diff only changes how that codec is picked (i.e. a compatible class instead of the exact class.) My comment about return types was merely to point out why a similar change isn't necessary for return values. Think of this roughly like:
try {
something(); // throws a FileNotFoundException
} catch (IOException e) {
// I expect this block to catch the FNFE
} ...
The exception being serialized and deserialized as a BaseException is what makes sense and exactly what is intended here.

IMO this is a perfectly sensible use case.  I also have an open pull request (https://github.com/facebook/swift/pull/257) that addresses this.  If I read these changes correctly, I think that my pull request covers this case without the need for a separate annotation, and also includes extra checks to ensure proper usage.
I think the 'final' requirement makes sense from the perspective that Thrift doesn't support inheritance for structs, and the impedance could be confusing for users who try to annotate multiple classes in a heirarchy.  However as an alternative to requiring structs to be final classes, it is possible to check the class heirarchy at startup to identify these sorts of usage errors.  Much more detail of what I mean is in the description of https://github.com/facebook/swift/pull/257 so I won't rehash here.
Also, with respect to:

and this is because when the client side tries to deserialized the exception, it will not know to expect a DerivedException, and will deserialize it as BaseException. This will probably succeed, but any fields exclusive to DerivedException fields will just be dropped

For non-Swift clients, this is a non-issue.  For Swift clients, if they really wanted to make sure that the exception is instantiated as the original DerivedException, users could a discriminator field to BaseException and define a builder that instantiates the right class based on that field.  Not saying that is a great design decision but nevertheless it is possible.

On further reflection, I think that the requirement that structs be final shouldn't exist with Swift as it currently stands. Updating the commits and PR accordingly.
@bgould, the requirements you list in the description of #257 do sound reasonable, and are compatible with all the use cases I thought of. I don't think I'm familiar enough with Swift's implementation to review your PR (sorry) so I'll leave that to the primary Swift developers.
In the meantime, I'd like to land this.

As long as Swift itself doesn't rely on being able to compare objects, it should be ok to not make it a requirement.
Classes generated by the idl to java generator should be marked as such if they implement equals/hashcode, though.

I agree with @martint

Consensus seems to be that this change is philosophically ok (@andrewcox acked with the caveat that we should add less restrictive checks soon.) Anyone want to accept the code? Cc @andrewcox @alandau @haijunz @electrum

great.. I think this allows AutoValue generated structs to work.. will check

authors: adriancole andrewcox bgould dain jesboat martint

repo: facebook/swift


text:
Check for empty error outputText in TeamCity reporter

I reported Issue #540 with a stack trace I was getting on build errors (instead of the error)

I believe @facebook-github-bot is in error and I wrote an email with information about who signed the CLA for Trello.

I will have to wait for them to reply or you sign the cla.
PR looks good, will be happy to merge.

@ExtremeMan I got an email back that the CLA is all set.  Is there anything more I need to do?

Thanks! Merged into master ;)

authors: ExtremeMan loufranco

repo: facebook/xctool


text:
YogaKit failing testFrameAndOriginPlacement

Report

[x] I have searched existing issues and this is not a duplicate

Issues and Steps to Reproduce
Run Yogokit test in Xcode
Expected Behavior
Pass Test
Actual Behavior

Fixed and tested with retina 2x and 3x , please try my PR https://github.com/facebook/yoga/pull/1026

We are deprecating YogaKit as part of the Yoga 2.0 release. We are still going to release a new revision based on the current state of the repo, but won't be accepting new contributions, since we are going to be removing it from the repo after.

authors: 100mango NickGerleman cntrump

repo: facebook/yoga


text:
Support for classes that define __new__ for mock_constructor

It currently has no support for classes with __new__, and will reject patching those.
IIRC, it was tough getting around Python idiosyncrasies to make mock_constructor work, and I willingly decided not to implement __new__ at first to simplify things, but this is potentially doable.

@deathowl  I just remembered there's an in-depth documentation of the trickery behind mock_constructor here. I think things should work, as we're not touching __new__ from the class, would have to test things.

repo: facebookincubator/TestSlide


text:
how to start https server with SSL cert?

Hi,
I am able to start the https server in windows using set HTTPS=true&&npm start.
Is it possible to pass the SSL cert and key to the https server?
e.g. for node http-server, I can start the https server with
http-server S -C c:\cert\server.pem -K c:\cert\server.key.
How do I achieve the same result for create-react-app?

The development server
You can't currently, react-scripts uses webpack-dev-server and it would need to pass key/cert files in this configuration block.
The better question is why do you want to pass a specific certificate for your dev server? This isn't very useful overall.
The production server
See the discussion in #1409 for details about HTTPs in production.

I’m going to close since it doesn’t seem really necessary in DEV, and it would either require configuration, or having some sort of convention for the filenames of the cert. If you feel strongly about this feel free to send a PR that uses a filename convention for them, and we can review it.

I'm surprised this was closed. Two-way client authentication is a typical part of our webapp's security design. And create-react-app does a lot to make developers' lives easier, so getting rid of the pesky security error would be nice.
Our particular use case is:

Install self-signed CA chain on both server and browser.
Install user's cert in browser, and server's cert in server.
When a browser connects, verify the user's cert's CA chain matches the server's.

So part of our development includes writing/testing the code that handles (3) above. This is not currently possible using the dev server.

Can you raise a new issue and describe your proposal in more detail? It's not clear to me what we should do to enable this. We do support HTTP=true environment variable which switches HTTPS mode in WebpackDevServer but I presume you need something more.

You're right my above comment wasn't clear and was conflating the original request with 2-way authentication. I've submitted #2759.

I have the same issue, I need to pass a certificate file in to webpackDevServer like so
https: {
  key: path/to/key/file,
  cert: path/to/pem/file
}

I'm running into this in dev as well. The use case is using some web services that use HTTPS, and browsers not allowing HTTP and HTTPS to be mixed on the same page for security reasons.

@disaacson check out the epic hack I found to get this working https://github.com/facebookincubator/create-react-app/issues/2759#issuecomment-332940060

The Use-Case: Developing a webapp that uses websockets.
Websockets will be declined by chrome with unsecure self-signed certificates.

I just made this change to scripts/start.js.
before-
    const devServer = new WebpackDevServer(compiler, serverConfig);

after-
    const devServer = new WebpackDevServer(compiler, {
      ...serverConfig,
      https: true
    });

Webpack dev server creates the certificate. Just navigate to https://localhost:3000, allow chrome to visit the site and you're good to go. It goes without saying that this is not a good practice. But a quick fix.

Looked at the code and it seems to be sensitive to an environment variable called HTTPS.
Changed my start script to HTTPS=true react-scripts start and it automatically generates the certificates and opens with https.
Looking on how I can supply my own certificate. Let me know if that interests any of you and I will share my findings :)

+1 for

how I can supply my own certificate

You will need to save your certificate as a pem file with the name server.pem into your node_modules/webpack-dev-server/ssl
Hope this helps

Why was this closed?
I'm requesting rss feed from a wordpress site. Now wordpress won't accept cross origin requests from a non secure origin. I don't understand the security implications behind this but I'm sure the guys at wordpress won't enable it for me.

I used following in start.js
process.env.HTTPS = 'true';

and
{
      ...serverConfig,
      https: {
        key: fs.readFileSync( "/usr/local/etc/httpd/server.key"),
        cert: fs.readFileSync("/usr/local/etc/httpd/server.crt")
      }
}

In WebpackDevServer

@roniger solution is great, thanks.
I added to my package.json's scripts section a postinstall  script that create a symlink from the local development certificate into the appropriate node_modules folder. This make sure the certificate is always in the right place, even if someone clones the repo, delete and reinstall node_modules etc.
Here is the gist if it helps someone.

if you run chrome enabling this seems to work
chrome://flags/#allow-insecure-localhost

authors: A4Abhiraj KarandikarMihir Reanmachine bitsandbytes disaacson eladmoshe gaearon itnirmaan jamesmfriedman mikehenken mksuper1 roniger sshadmand tobias74

repo: facebookincubator/create-react-app


text:
[Feature] Have a special flag to enable experimental features

I feel we're closer than ever before on getting CSS sourcemaps functional for which I've been working on CRA fork that so far holds up to issues caused by previous attempts at this problem (see https://github.com/facebookincubator/create-react-app/pull/591#pullrequestreview-463675)
PR for which will be up very soon.
This PR will replace style-loader and new setup will handle things differently. Considering that as well as react-hot-loader or #2304 , these are clearly new windows to awesomeness and bugs.
So how about CRA published with new features (even unstable) included that can be enabled by passing flag to yarn start?
For example: yarn start --rhl --css-maps
Thoughts welcome

This will allow larger community to get involved which means more bug reports = more patches = more stability.
Also getting CSS sourcemaps working (and included in CRA) is very critical for me because I'm working on a chrome devtools extension for React devs which leverages getResources API and I can't use this without sourcemaps.

#2304

We've recently developed a bot that releases pull requests.
I think this accomplishes what you'd like.

So how about CRA published with new features (even unstable) included that can be enabled by passing flag to yarn start?

Problem is this would make the config files more complex with the addition of checks to the flag. The ejected setup would be harder for beginner to read.
Also, if the users relying on these flags and it turns out that CRA won't go further with experimental feature, they'll leave out without a non-upgradeable setup.
IMO the best way to go forward is to enhance forking experience. Filed one of ideas that can be done here https://github.com/facebookincubator/create-react-app/issues/3088. @Timer can we have the renaming script you create for @react-scripts-dangerous? :wink:

@viankakrisna repo is here: https://github.com/Timer/monorepo-contrib
@NeekSandhu I don't think we're going to be adding flags any time soon [as @viankakrisna said], and I believe @react-scripts-dangerous is the closest we'll get to a "experimental" version of CRA.

If you submit a pull request that passes CI, a release will automatically be created for you that you can depend on until we merge your pull request (so you don't have to eject).

See an example of this here: https://github.com/facebookincubator/create-react-app/pull/3145#issuecomment-331349585.

@Timer I was aware of bot and have to say it's really awesome. But the main reason behind this issue and my previous PR #3163 was getting as many people (brains and eyes) as possible aware and involved* by bringing new things to forefront instead of being a dormant PR.
But again, I understand the disruption of design philosophies this will cause as stated by @viankakrisna
* bug reports, ideas, inspiration

authors: NeekSandhu Timer viankakrisna


text:
Unexpected token (7:2) You may need an appropriate loader to handle this file type.

Ran create-react-app react-my-create-react-app-created
followed by npm start
with this error result:
Error in d:/src/react-my-create-react-app-created/src/index.js
Module parse failed: d:\src\react-my-create-react-app-created\src\index.js Unexpected token (7:2)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (7:2)

and here's the devtools console output:
[HMR] Waiting for update signal from WDS...
webpack:///multi_main?:4 Uncaught Error: Cannot find module "c:\Users\guivh\src\react-my-create-react-app-created\src\index"
client:23 [WDS] Hot Module Replacement enabled.
client:46 [WDS] Errors while compiling.
client:48 d:/src/react-my-create-react-app-created/src/index.js
Module parse failed: d:\src\react-my-create-react-app-created\src\index.js Unexpected token (7:2)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (7:2)
    at Parser.pp$4.raise (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:2221:15)
    at Parser.pp.unexpected (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:603:10)
    at Parser.pp$3.parseExprAtom (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1822:12)
    at Parser.pp$3.parseExprSubscripts (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1597:21)
    at Parser.pp$3.parseExprList (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:2165:22)
    at Parser.pp$3.parseSubscripts (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1741:35)
    at Parser.pp$3.parseExprSubscripts (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1718:17)
    at Parser.pp$3.parseMaybeUnary (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1692:19)
    at Parser.pp$3.parseExprOps (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1637:21)
    at Parser.pp$3.parseMaybeConditional (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1620:21)
    at Parser.pp$3.parseMaybeAssign (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1597:21)
    at Parser.pp$3.parseExpression (D:\src\react-my-create-react-app-created\node_modules\react-scripts\node_modules\acorn\dist\acorn.js:1573:21)
 @ multi main

npm version is 3.10.4
node version ia v6.3.1
Please advise

SyntaxError: Unexpected token (7:2) means there is a syntax error on line 7, column 2 in d:\src\react-my-create-react-app-created\src\index.js. Can you please show this file? Have you modified it in any way?
It would be great if you could share the project reproducing the issue.

It is the file as created by the tool.
It's content is:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
,
document.getElementById('root')
);
I attach a zip file of the project:
react-my-create-react-app-created.zip
Guido

Seeing this too on a similar setup:

Windows
npm 3.10.6
Node 6.2.0
create-react-app 0.3.0

All I did was create the app and run npm start.

Did some digging. In my case it's a symlink issue. If cwd is a symlink, babel-loader skips all the .js files. If I cd to the project's real path and npm start from there - it works.

Will try to dive in and work on a PR.

I trashed the node_modules directory, ran npm install followed by npm start and it worked: no longer any problem.
I then ran
npm remove -g create-react-app
npm install -g create-react-app
create-react-app test-react-app
cd test-react-app
npm start
and this worked without problems.
So, as far as I am concerned, this issue is solved.
FWIW, I'm running on windows, so my problem may not have been caused by a symlink, I don'y know.

I am still getting a "You may need an appropriate loader to handle this file type." with a symlink'ed folder in src/. Was this supposedly fixed by https://github.com/facebookincubator/create-react-app/commit/07105bfd877cd56d4ab0b1a669199f877c8c9174? (on OS X).

Nevermind, my issue seems to be in the lines of https://github.com/webpack/webpack/issues/2937

It was fixed but not released. You can see the issue is tagged with a milestone. When the related milestone is released, you will see it on the GitHub Releases page and in the CHANGELOG.MD.

This should be fixed in 0.4.2.
Please verify!

@gaearon My comment was based on master, but either way I think my problem is (somewhat) unrelated. I wanted to symlink a "shared" library in my project but ran into some issues with babel and npm using the symlink'ed folder absolute path and not the path where the symlink is (so loaders did not process the files in the shared folder, and npm module resolution was happening in the shared folder hierarchy). Not a problem with react-create-app; sorry for the confusion!

I had this error and it was because I created my components folder outside the src folder. Once I moved it inside src everything worked fine.
I just wanted to drop my amateur mistake and solution here just in case someone comes across it in the future.

@jturbo26  What if you are importing a component that lives in a separate dir outside of src? Say in the case when you have more than one app sharing a component? I'm running into this error and there is no real solution, I don't want to bring the component into src because it's supposed to exist separately.

@leshow It’s just not supported right now, sorry. There are a dozen issues about this, and we intend to solve it in some way in the future, but for now we don’t have a good solution for sharing components between several apps locally with CRA.

Is there a recommended path to get it working if you eject? I was able to
yarn link a local package and add it's directory in babel-loader, but I'm
not sure if there's an easier way.
On 27 Feb 2017 3:21 pm, "Dan Abramov" notifications@github.com wrote:
@leshow https://github.com/leshow It’s just not supported right now,
sorry. There are a dozen issues about this, and we intend to solve it in
some way in the future, but for now we don’t have a good solution for
sharing components between several apps locally with CRA.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebookincubator/create-react-app/issues/637#issuecomment-282841170,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABE3bpMx2d21TdO7_pb6qxqsm2oKXEXAks5rgzBMgaJpZM4J7jeJ
.

You can change the include setting in Webpack configs to anything you'd like. Unfortunately I don't have a particular solution: usually we figure them out when we integrate them in CRA itself. 😉

Believe it or not, my issue was the commented code at the end of the file:
/*
import { Http } from '@angular/http';

@Component({
  selector: 'page-login',
  templateUrl: 'login.html'
})
export class LoginPage {}
*/

Removing it, or fully commenting it like so:
//
//import { Http } from '@angular/http';

//@Component({
//  selector: 'page-login',
//  templateUrl: 'login.html'
//})
//export class LoginPage {}
//

..fixes the issue

I'm trying to import a react component button.js file from node_modules which is a component made by me and I get You may need an appropriate loader to handle this file type. using create-react-app..
any ideas?

My amateur issue -> somehow WebStorm acted like it created a JS file, but in reality, when checked inside explorer, the file was not JS...

This is an old issue that was fixed. Adding comments here is like shouting in the void :-)
If you experience a problem with the same symptom (but a different cause) please file a new issue, describe it in detail and provide a reproducing case.

authors: Inconspicuously a3gis gaearon guivho jturbo26 leshow motiz88 unutoiul xvasko


text:
(Do not merge) Enable generators

This bundles the regenerator runtime when you use the generator syntax.
It would fix #125 and be the first step towards #51.
One issue I’m seeing right now is that minified bundle increases by 5kB min+gzip even if you don’t use generators because transform-runtime currently externalizes Babel helpers whether you want it or not, and they bring in some stuff from core-js including Symbol.
@kittens said he’s open to fixing it on Babel side by adding helpers: [true] to transform-runtime so we can turn them off.

@kittens said he’s open to fixing it on Babel side by adding helpers: [true] to transform-runtime so we can turn them off.

helpers: false babel/babel#3603

@gaearon @kittens
That doesn't seem like the right fix. Wouldn't it make more sense to either compile babel-runtime without the runtime transform, or else not pull in polyfills in helpers when polyfilling is disabled?
Those helpers shouldn't be pulling in polyfills via sniffing for their existence.
All else being the same, just externalizing the helpers ought to decrease bundle size.

It seems like a bug that using babel-runtime makes https://github.com/babel/babel/blob/v6.11.6/packages/babel-helpers/src/helpers.js#L8-L12 pull in a Symbol polyfill.

Released babel-plugin-transform-runtime@6.12.0 with the PR ^

authors: gaearon hzoo kittens taion


text:
added react-scripts lint

Added react-script for linting with specifications in #1217 & #2625

@gaearon  updated PR (rebased) with your notes for require.resolve and simple e2e test.
Found that on the close event listener, ESLint will send a code of 0 or 1 on successful finishes (0: ESLint found no lint errors, 1: ESLint found lint errors) so that code is not particularly useful.  So what we can only mainly check is errors throughout and the closing signal.

@gaearon ping!

Apologies, what I meant is we should add ./node_modules/.bin/react-scripts lint to our end-to-end testing suite that runs on CI. This helps us catch regressions. We should run it both before and after ejecting.

@gaearon updated commit, let me know what you think

@gaearon ping!

Hmm, I'm really not sold on the benefit here. This can be handled on CI way more accurately as npm run build or as part of npm test.
I'll leave it to your discretion, @gaearon.

@Timer yeah, it's a bit weird to really test if linting works or not.  Putting it in tasks/e2e-simple.sh made sense to me because it tries to lint and if it doesn't work, it throws the error.
Is there a better way in the npm run build or npm test script that can test if lint works?  Perhaps I might be thinking of the test wrong (lint works or not), when there's a better way to test it!

This can be handled on CI way more accurately as npm run build or as part of npm test.

This is for the case when build is taking minutes and you just want to do a quick lint check.

@gaearon updated, apologies in advance for a bit of hand-holding through this

Hello! I'm a bot that helps facilitate testing pull requests.
Your pull request (commit a452a0fb9fa7e67fcdca075d2598958162f2636a) has been released on npm for testing purposes.
npm i react-scripts-dangerous@1.0.11-a452a0f.0
# or
yarn add react-scripts-dangerous@1.0.11-a452a0f.0
# or
create-react-app --scripts-version=react-scripts-dangerous@1.0.11-a452a0f.0 folder/

Note that the package has not been reviewed or vetted by the maintainers. Only install it at your own risk!
Thanks for your contribution!

How is this going?

For anyone interested, I solved this differently because I have some other code styles to follow. It's really not that challenging:
Create an .eslintrc file:
{
  "extends": "./node_modules/eslint-config-react-app/index.js",
  "rules"  : {
    "key-spacing": [
      "error",
      {
        "align": "colon"
      }
    ]
  }
}

Add a linting script in package.json:
"lint": "node_modules/eslint/bin/eslint.js src"
That's it. Now you cna run yarn lint or npm run lint. And you can define your own rules.

Should this PR be closed since it has been picked up and continued in #3850 ? @Timer

authors: RWOverdijk SirBif Stupidism Timer devonJS gaearon react-scripts-dangerous


text:
Docker compose fails with 'Failed to run install_mvfst .'

Problem description
Ran docker-compose build ubuntu-cpp but ran into errors like
Is there an already published docker image which works?
System information
docker --version
Docker version 26.1.4, build 5650f9b
arm64-apple-darwin23.4.0
CMake log
1016.8 /mvfst/quic/common/CircularDeque-inl.h: In instantiation of ‘quic::CircularDeque<T>::iterator quic::CircularDeque<T>::emplace(quic::CircularDeque<T>::const_iterator, Args&& ...) [with Args = {const quic::WriteBufferMeta&}; T = quic::WriteBufferMeta; quic::CircularDeque<T>::iterator = quic::CircularDeque<quic::WriteBufferMeta>::CircularDequeIterator<quic::WriteBufferMeta>; quic::CircularDeque<T>::const_iterator = quic::CircularDeque<quic::WriteBufferMeta>::CircularDequeIterator<quic::WriteBufferMeta>]’:
1016.8 /mvfst/quic/common/CircularDeque-inl.h:323:17:   required from ‘quic::CircularDeque<T>::iterator quic::CircularDeque<T>::insert(quic::CircularDeque<T>::const_iterator, const T&) [with T = quic::WriteBufferMeta; quic::CircularDeque<T>::iterator = quic::CircularDeque<quic::WriteBufferMeta>::CircularDequeIterator<quic::WriteBufferMeta>; quic::CircularDeque<T>::const_iterator = quic::CircularDeque<quic::WriteBufferMeta>::CircularDequeIterator<quic::WriteBufferMeta>]’
1016.8 /mvfst/quic/state/StreamData.h:513:26:   required from here
1016.8 /mvfst/quic/common/CircularDeque-inl.h:289:11: warning: operation on ‘index’ may be undefined [-Wsequence-point]
1016.8 ninja: build stopped: subcommand failed.
1016.9 + sudo --preserve-env cmake --install _build
1017.1 -- Install configuration: "Release"
1017.1 -- Installing: /usr/local/lib/cmake/mvfst/mvfst-targets.cmake
1017.1 -- Installing: /usr/local/lib/cmake/mvfst/mvfst-targets-release.cmake
1017.1 -- Installing: /usr/local/lib/cmake/mvfst/mvfst-config.cmake
1017.1 -- Installing: /usr/local/include/quic/QuicConstants.h
1017.1 -- Installing: /usr/local/lib/libmvfst_constants.a
1017.1 -- Installing: /usr/local/include/quic/QuicException.h
1017.1 -- Installing: /usr/local/lib/libmvfst_exception.a
1017.1 -- Installing: /usr/local/include/quic/api/IoBufQuicBatch.h
1017.1 -- Installing: /usr/local/include/quic/api/LoopDetectorCallback.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicBatchWriter.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicBatchWriterFactory.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicGsoBatchWriters.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicPacketScheduler.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicSocket.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicStreamAsyncTransport.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicTransportBase.h
1017.1 -- Installing: /usr/local/include/quic/api/QuicTransportFunctions.h
1017.1 CMake Error at _build/quic/api/cmake_install.cmake:86 (file):
1017.1   file INSTALL cannot find "/mvfst/_build/quic/api/libmvfst_transport.a": No
1017.1   such file or directory.
1017.1 Call Stack (most recent call first):
1017.1   _build/quic/cmake_install.cmake:71 (include)
1017.1   _build/cmake_install.cmake:74 (include)
1017.1
1017.1
1017.1
1017.1 real	1m10.170s
1017.1 user	10m47.899s
1017.1 sys	0m26.077s
1017.1 + echo 'Failed to run install_mvfst .'
1017.1 Failed to run install_mvfst .
1017.1 + exit 1

A recent docker image build was successful https://github.com/facebookincubator/velox/actions/runs/9672757599/job/26685597501
I see arm64-apple-darwin23.4.0 in your system information. Are you building using qemu for x86_64 on apple arm64?
Can you try on a x86_64 machine?

Nope, I just built on arm, expecting the docker compose to pick that up and choose base images accordingly. Is the current docker compose only supported on x86?

Yes, docker compose for ubuntu and centos only support x86. Are there Ubuntu and Centos base images for apple arm?

I see that Ubuntu has an image for arm https://ubuntu.com/download/server/arm. Looks like the setup script needs some changes.

I hit this while building fbthrift and not mvfst. The issue is that the build failed ninja: build stopped: subcommand failed.. For me, the failure was due to c++: fatal error: Killed signal terminated program cc1plus from insufficient memory.

I think I had seen the insufficient memory before and setting a limit on the threads worked -e NUM_THREADS=2. But the the error that I saw was different

I was able to build Prestissimo (which includes Velox) with some changes.
https://github.com/facebookincubator/velox/pull/10346

With #10346 merged I assume this is solved now. If not feel free to reopen :)

authors: assignUser jaystarshot majetideepak

repo: facebookincubator/velox


text:
RowVector::resize failing diff time fuzzer again due to diff revert.

Bug description
https://app.circleci.com/pipelines/github/facebookincubator/velox/34214/workflows/f85b36b9-9c85-4bb4-9637-abd4c4fea6bb/jobs/223165
System information
NA
Relevant logs
No response

cc: @mbasmanova

another one
https://github.com/facebookincubator/velox/issues/6748

Fixed by https://www.internalfb.com/diff/D49841643?src_version_fbid=338387418569046


text:
Build issue with ABFS adapter

Bug description
https://github.com/facebookincubator/velox/actions/runs/8793602118/job/24131750229?pr=9478
System information
n/a
Relevant logs
FAILED: velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/MockBlobStorageFileClient.cpp.o
/usr/bin/ccache /opt/rh/gcc-toolset-9/root/bin/g++ -DAZ_RTTI -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DCURL_STATICLIB -DFOLLY_HAVE_INT128_T=1 -DGFLAGS_IS_A_DLL=0 -DSIMDJSON_THREADS_ENABLED=1 -DVELOX_ENABLE_ABFS -DVELOX_ENABLE_GCS -DVELOX_ENABLE_HDFS3 -DVELOX_ENABLE_PARQUET -DVELOX_ENABLE_S3 -I/usr/local/cuda-11.8/targets/x86_64-linux/include -I/__w/velox/velox/. -I/__w/velox/velox/velox/external/xxhash -I/__w/velox/velox/_build/release/_deps/xsimd-src/include -I/__w/velox/velox/_build/release/_deps/curl-src/include -I/__w/velox/velox/_build/release -I/__w/velox/velox/_build/release/_deps/simdjson-src/include -isystem /__w/velox/velox/velox -isystem /__w/velox/velox/velox/external -isystem /usr/include/libdwarf -isystem /__w/velox/velox/_build/release/_deps/gtest-src/googletest/include -isystem /__w/velox/velox/_build/release/_deps/gtest-src/googletest -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-implicit-fallthrough          -Wno-empty-body          -Wno-class-memaccess          -Wno-comment          -Wno-int-in-bool-context          -Wno-redundant-move          -Wno-array-bounds          -Wno-maybe-uninitialized          -Wno-unused-result          -Wno-format-overflow          -Wno-strict-aliasing -Werror -O3 -DNDEBUG -std=gnu++17 -fPIE -fdiagnostics-color=always -Wno-deprecated-declarations -pthread -MD -MT velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/MockBlobStorageFileClient.cpp.o -MF velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/MockBlobStorageFileClient.cpp.o.d -o velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/MockBlobStorageFileClient.cpp.o -c /__w/velox/velox/velox/connectors/hive/storage_adapters/abfs/tests/MockBlobStorageFileClient.cpp
In file included from /__w/velox/velox/velox/connectors/hive/storage_adapters/abfs/tests/MockBlobStorageFileClient.cpp:17:
/__w/velox/velox/./velox/connectors/hive/storage_adapters/abfs/tests/MockBlobStorageFileClient.h: In constructor 'facebook::velox::filesystems::test::MockBlobStorageFileClient::MockBlobStorageFileClient()':
/__w/velox/velox/./velox/connectors/hive/storage_adapters/abfs/tests/MockBlobStorageFileClient.h:30:27: error: 'using element_type = class facebook::velox::exec::test::TempFilePath' {aka 'class facebook::velox::exec::test::TempFilePath'} has no member named 'path'; did you mean 'const string facebook::velox::exec::test::TempFilePath::path_'? (accessible via 'const string& facebook::velox::exec::test::TempFilePath::getPath() const')
   30 |     filePath_ = tempFile->path;
      |                           ^~~~
      |                           getPath()
[1499/1981] Building CXX object velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/AbfsFileSystemTest.cpp.o
FAILED: velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/AbfsFileSystemTest.cpp.o
/usr/bin/ccache /opt/rh/gcc-toolset-9/root/bin/g++ -DAZ_RTTI -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DCURL_STATICLIB -DFOLLY_HAVE_INT128_T=1 -DGFLAGS_IS_A_DLL=0 -DSIMDJSON_THREADS_ENABLED=1 -DVELOX_ENABLE_ABFS -DVELOX_ENABLE_GCS -DVELOX_ENABLE_HDFS3 -DVELOX_ENABLE_PARQUET -DVELOX_ENABLE_S3 -I/usr/local/cuda-11.8/targets/x86_64-linux/include -I/__w/velox/velox/. -I/__w/velox/velox/velox/external/xxhash -I/__w/velox/velox/_build/release/_deps/xsimd-src/include -I/__w/velox/velox/_build/release/_deps/curl-src/include -I/__w/velox/velox/_build/release -I/__w/velox/velox/_build/release/_deps/simdjson-src/include -isystem /__w/velox/velox/velox -isystem /__w/velox/velox/velox/external -isystem /usr/include/libdwarf -isystem /__w/velox/velox/_build/release/_deps/gtest-src/googletest/include -isystem /__w/velox/velox/_build/release/_deps/gtest-src/googletest -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-implicit-fallthrough          -Wno-empty-body          -Wno-class-memaccess          -Wno-comment          -Wno-int-in-bool-context          -Wno-redundant-move          -Wno-array-bounds          -Wno-maybe-uninitialized          -Wno-unused-result          -Wno-format-overflow          -Wno-strict-aliasing -Werror -O3 -DNDEBUG -std=gnu++17 -fPIE -fdiagnostics-color=always -Wno-deprecated-declarations -pthread -MD -MT velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/AbfsFileSystemTest.cpp.o -MF velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/AbfsFileSystemTest.cpp.o.d -o velox/connectors/hive/storage_adapters/abfs/tests/CMakeFiles/velox_abfs_test.dir/AbfsFileSystemTest.cpp.o -c /__w/velox/velox/velox/connectors/hive/storage_adapters/abfs/tests/AbfsFileSystemTest.cpp
In file included from /__w/velox/velox/velox/connectors/hive/storage_adapters/abfs/tests/AbfsFileSystemTest.cpp:31:
/__w/velox/velox/./velox/connectors/hive/storage_adapters/abfs/tests/MockBlobStorageFileClient.h: In constructor 'facebook::velox::filesystems::test::MockBlobStorageFileClient::MockBlobStorageFileClient()':
/__w/velox/velox/./velox/connectors/hive/storage_adapters/abfs/tests/MockBlobStorageFileClient.h:30:27: error: 'using element_type = class facebook::velox::exec::test::TempFilePath' {aka 'class facebook::velox::exec::test::TempFilePath'} has no member named 'path'; did you mean 'const string facebook::velox::exec::test::TempFilePath::path_'? (accessible via 'const string& facebook::velox::exec::test::TempFilePath::getPath() const')
   30 |     filePath_ = tempFile->path;
      |                           ^~~~
      |                           getPath()
/__w/velox/velox/velox/connectors/hive/storage_adapters/abfs/tests/AbfsFileSystemTest.cpp: In member function 'virtual void AbfsFileSystemTest::SetUp()':
/__w/velox/velox/velox/connectors/hive/storage_adapters/abfs/tests/AbfsFileSystemTest.cpp:69:38: error: 'using element_type = class facebook::velox::exec::test::TempFilePath' {aka 'class facebook::velox::exec::test::TempFilePath'} has no member named 'path'; did you mean 'const string facebook::velox::exec::test::TempFilePath::path_'? (accessible via 'const string& facebook::velox::exec::test::TempFilePath::getPath() const')
   69 |     azuriteServer->addFile(tempFile->path, filePath);
      |                                      ^~~~
      |                                      getPath()

@zhli1142015

Thanks, posted a fix for this: https://github.com/facebookincubator/velox/pull/9577.