How to Import a Local React-Native NPM Package

By Johannes Filter
Published Oct 12, 2017

I had to fix an unmaintained NPM package for my latest React-Native app. But I struggled to import it locally. npm install $relative-patch or npm link were not working (check also this issue ). For me, it looks like there is no simple way to import a local package that is outside of the root of your React-Native project. So I figured out I just place my local components in a folder local_components within the react-native root project. Then, I can just import X from ‘package-X’; without having to touch the package.json of the react-native project.