Coder Social home page Coder Social logo

react-native-fix-headers's Introduction

react-native-fix-headers

Script that automagically adds needed Header Search Path entries for all dependencies in node_modules.

If you are using custom React Native modules you often need to set proper Header Search Path in XCode to successfully build the project. This node script makes it as easy as calling npm run fix-headers.

Installation

  1. npm install --save-dev react-native-fix-headers
  2. Add a scripts entry in your package.json like so:
"scripts": {
  "fix-headers": "node `npm bin`/react-native-fix-headers"
},

Usage

npm run fix-headers

License

Any time you use this script you must smile at somebody around you ๐Ÿ˜Š

Dependencies

react-native-fix-headers's People

Contributors

elijen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-fix-headers's Issues

TypeError: buildSettings.HEADER_SEARCH_PATHS.forEach is not a function

Firstly, thanks for this library! It's a big help with a tedious chore.

I get this error when running the script


/Users/Julian/.../node_modules/react-native-fix-headers/node_modules/xcode/lib/pbxProject.js:1287
        buildSettings['HEADER_SEARCH_PATHS'].forEach(function(existingFile){
                                             ^

TypeError: buildSettings.HEADER_SEARCH_PATHS.forEach is not a function
    at pbxProject.addToHeaderSearchPaths (/Users/Julian/.../node_modules/react-native-fix-headers/node_modules/xcode/lib/pbxProject.js:1287:46)
    at pbxProject.<anonymous> (/Users/Julian/.../node_modules/react-native-fix-headers/index.js:14:20)
    at pbxProject.emit (events.js:182:13)
    at pbxProject.<anonymous> (/Users/Julian/.../node_modules/react-native-fix-headers/node_modules/xcode/lib/pbxProject.js:48:18)
    at ChildProcess.emit (events.js:182:13)
    at emit (internal/child_process.js:811:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @1.3.20 fix-headers: `node `npm bin`/react-native-fix-headers`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @1.3.20 fix-headers script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Julian/.npm/_logs/2018-06-28T21_15_04_839Z-debug.log

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.