Giter Club home page Giter Club logo

Comments (11)

vspedr avatar vspedr commented on May 12, 2024 10

TLDR: check your installed dependencies if you're using version 2.0.1-rc.x

Hey guys, I was having the same problem in a project which currently uses RN 0.32.
After clean installing my dependencies, I noticed the build was failing on XCode. So I looked at my package.json and saw "react-native-fs": "^2.0.1-rc.2". Then I ran npm ls react-native-ls and noticed the actual installed version was 2.0.1-rc.3, which introduces the library import change that was breaking the build. So I did the following:

  • removed the ^ from that line in package.json to force it to install rc.2
  • clean install node_modules
  • on XCode, Product -> Clean then Build again...

And it worked!

from react-native-fs.

iSimar avatar iSimar commented on May 12, 2024 3

getting this problem, any solution?

from react-native-fs.

timbuckley avatar timbuckley commented on May 12, 2024 2

@siwymilek Any clue how you solved this would be really appreciated!

from react-native-fs.

Tritlo avatar Tritlo commented on May 12, 2024 2

I am having the same issue. No luck with the Header Search Paths. #238 fixed the issue for me when I applied it manually.

from react-native-fs.

timbuckley avatar timbuckley commented on May 12, 2024 1

@vspedr Indeed, we performed the same action and that solved the issue!

from react-native-fs.

igolden avatar igolden commented on May 12, 2024

I too recently got this error for no apparent reason. Checking versions, build paths, etc.. no luck yet. Prevented builds for over a day now.

from react-native-fs.

cjdell avatar cjdell commented on May 12, 2024

I had this occur with the test app last night after an upgrade. I solved it by making sure the "Build Settings" -> "Header Search Paths" was set to include the React library. You should have this entry:

$(SRCROOT)/../node_modules/react-native/React - (Recursive)

You might also be able to fix it by removing and re-adding the reference to library, but that didn't work for me. Hope this helps.

from react-native-fs.

iSimar avatar iSimar commented on May 12, 2024

@cjdell Just tried including that in the "Build Settings" -> "Header Search Paths". Unfortunately, no luck :(

from react-native-fs.

cjdell avatar cjdell commented on May 12, 2024

@iSimar Did you do it for both Project and Target (in the sidebar)? They are actually two separate configurations (not sure why). Failing that, you could try a reinstall of the react-native module.

from react-native-fs.

iSimar avatar iSimar commented on May 12, 2024

Think i found the fix, no need to change "Header Search Paths".

PR created:
#238

Also discussed this issue on stackoverflow:
http://stackoverflow.com/a/41664041/3152113

Update: Yupe, works on iOS now.

from react-native-fs.

igolden avatar igolden commented on May 12, 2024

#238 worked for me when I implemented it manually, but it just didn't feel comfortable editing a module i don't support.

Eventually I fixed it without modifying the RNFS package by doing the following:

  1. Checked my react-native version. I was running 0.33.0 (default installed by CLI). So I upgraded to 0.36.0. (also tried 0.40.0, but there's a library import change on that build)

  2. I removed all files in ios/* and deleted node_modules. Then I ran npm install && react-native upgrade which installed my upgraded react-native package.

  3. I ran react-native link and I was up and running.

Funny enough, when I popped into the app this morning it threw the error again, but when I ran through the steps above it fixed it for me. Still feel like there's a better solution out there.

from react-native-fs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.