RonRadtke / react-native-blob-util

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
769 stars 130 forks source link

Windows: Build fails after update to react-native 0.75.x and react-native-windows 0.75,x #382

Open JakobKrummeichAndrena opened 2 months ago

JakobKrummeichAndrena commented 2 months ago

For react-native version 0.75.x and react-native-windows version 0.75.x this library does not compile anymore on windows. There are two issues: the TargetPlatformMinVersion is too low and there is an error when compiling the sources.

The error is

× Build failed with message C:\blobutiltestproject\node_modules\react-native\ReactCommon\react\bridging\Convert.h(81,1): error C2938: 'std::enable_if_t<false,int>' : Failed to specialize alias template (compiling source file C:\blobutiltestproject\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\TurboModuleProvider.cpp) [C:\blobutiltestproject\node_modules\react-native-blob-util\windows\ReactNativeBlobUtil\ReactNativeBlobUtil.vcxproj]. Check your build configuration. Command failed. Re-run the command with --logging for more information.

Steps to reproduce:

  1. npx --yes @react-native-community/cli@next init blobutiltestproject --version "latest"
  2. cd blobutiltestproject
  3. yarn add react-native-windows@^0.75.0
  4. npx react-native init-windows --overwrite
  5. yarn add react-native-blob-util
  6. change WindowsTargetPlatformMinVersion in node_modules/react-nativve-blob-util/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.vcxproj to 10.0.17763.0
  7. yarn windows
  8. get the error messge mentioned above

Package versions (resolutions): react-native: 0.75.3 react-native-windows: 0.75,0 react-native-blob-util: 0.19.11

OS Version: Windows 10 Visual Studio: Visual Studio Community 2022, Version 17.11.35303.130

To summarize, there are two issues:

  1. WindowsTargetPlatformMinVersion needs to be increased
  2. Windows project does not compile (I don't know how to fix it)
raphpay commented 1 month ago

Same here

JakobKrummeichAndrena commented 1 month ago

@RonRadtke do we have any updates on this? :)

raphpay commented 1 month ago

@RonRadtke do we have any updates on this? :)

None for now 🤷🏼‍♂️

JakobKrummeichAndrena commented 2 weeks ago

@RonRadtke do we have any updates on this?

surajkhanal commented 3 days ago

Facing the same issue

JakobKrummeichAndrena commented 3 days ago

We were now forced to replace react-native-blob-util with this one: https://github.com/birdofpreyru/react-native-fs

RonRadtke commented 3 days ago

If anyone has a fix for it - would be great. Will take a while till I have the time to set up and look into it since it requires the windows setup

JakobKrummeichAndrena commented 3 days ago

Ok thanks for the reply! Unfortunately, the windows setup is really annoying. Now that we found a different solution we are of course much less inclined to work out a solution ourselves.

RonRadtke commented 3 days ago

Ok thanks for the reply! Unfortunately, the windows setup is really annoying. Now that we found a different solution we are of course much less inclined to work out a solution ourselves.

Of course - I can understand that very much. Still would be great though, but I can understand that you switch and don't want to invest in this lib then, no worries :)

cjhines commented 1 day ago

Can someone confirm that the following patch also works for them?

If so, I'll make a PR :)

react-native-blob-util+0.19.11.patch