Comments (5)
I'm using with "react-native": "0.73.7" @sepsol, and "react-native-ping": "^1.2.8".
from react-native-ping.
@marceloch2 I just try to install it today but I got
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR! react-native@"0.73.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.41.2 || ^0.57.0 || ^0.68.0 || ^0.70.0" from [email protected]
Did you install with --force or --legacy-peer-deps?
from react-native-ping.
@marceloch2 I just try to install it today but I got
npm ERR! Found: [email protected] npm ERR! node_modules/react-native npm ERR! react-native@"0.73.6" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react-native@"^0.41.2 || ^0.57.0 || ^0.68.0 || ^0.70.0" from [email protected]
Did you install with --force or --legacy-peer-deps?
As it certainly do the job... Doesn't this mean this restrictions are not totally true? I mean. at 0.71.5 this module works just fine. The only thing I did was... Copying the index.d.ts onto my types one as this:
declare module 'react-native-ping' {
type PingOptions = {
/** Amount of time in ms to wait before reporting ping failed (Default: 1000ms) */
timeout?: number;
/** [iOS only] Size of the payload to send to the server (Default: 56 bytes) */
payloadSize?: number;
};
type TrafficStats = {
receivedNetworkSpeed: string;
receivedNetworkTotal: string;
sendNetworkSpeed: string;
sendNetworkTotal: string;
};
export default class Ping {
/**
* Ping a specified server and return the RTT (Round-trip time) in ms
*
* @param ipAddress IP Address of the server to ping (eg: 8.8.8.8)
* @param options Optional parameters
*/
static start(
ipAddress: string,
options?: PingOptions,
): Promise<number>;
static getTrafficStats(): Promise<TrafficStats>;
}
}
So, then, if all the job is done... Why don't just increase the versions the module is available at? And, if it certainly works on typescript, why don't make it available to do so?
from react-native-ping.
--legacy-peer-deps
No --legacy-peer-deps or --force ish added my side. But I'm using yarn, can you try with it?
from react-native-ping.
--legacy-peer-deps
No --legacy-peer-deps or --force ish added my side. But I'm using yarn, can you try with it?
I see the issue...
This seems to be the code available at npm. Different from the one at master which is:
(...)
"peerDependencies": {
"react-native": ">=0.41.2"
}
Then, this must be fixed as simple as merge package.json into the npm available one
from react-native-ping.
Related Issues (20)
- [iOS] Random crashing due to apparent race condition
- PingUtil_Message_HostErrorUnknown HOT 8
- Illegal callback invocation from native module. This callback type only permits a single invocation from native code. HOT 1
- IOS Thread creation error
- Cannot read property 'start' of undefined HOT 2
- PingUtil_Message_HostErrorUnknown HOT 3
- Error After integrating this package on android. HOT 2
- receivedNetworkSpeed and sendNetworkSpeed are always 0 b/s HOT 7
- Fatal issue when handler HOT 3
- Error with V.1.2.5 HOT 2
- npm install react-native-ping not working HOT 2
- ReactNative in Expo HOT 2
- Android X HOT 1
- I am getting " cannot find symbol : packages.add(new RNReactNativePingPackage());" HOT 1
- Dependency Dashboard
- Set Interval Cannot Reset HOT 1
- can not install HOT 2
- @types added HOT 2
- PingUtil_Message_HostErrorUnknown HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-ping.