New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-port-patcher

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-port-patcher

Replace all instances of hard coded port 8081 in react-native and @react-native-community packages

1.0.5
latest
npm
Version published
Weekly downloads
686
-27.33%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-port-patcher

Attempts to resolve this issue: https://productpains.com/post/react-native/allow-packager-port-to-be-configurable-change-from-8081/

HowTo

Install it as a dev-dependency in your react-native project:

npm install -D react-native-port-patcher

Then update your package.json to include:

  "scripts": {
    "postinstall": "react-native-port-patcher --new-port 8088"
  }

Now after you yarn or npm install, the script will find your react-native package and @react-native-community projects under node_modules and regex search/replace all instances of /\b8081\b/g with the port you provide.

FAQs

Package last updated on 06 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts