-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native install issues #19
Comments
Update: I removed the creation of the client, and still have the same issue. It seems as if the issue has to do with the actual |
Update: It seems as if the issue is from the In the mean time, I removed |
Also, the |
Sorry for all the trouble here @justinmakaila. We're actually working on a new version of this and we'll let you know when it's out. |
@jared-clarifai hi, is this issue fixed? now same error here, version 2.2.0 |
I just replaced all `var Promise = require('promise')` with
`Global.Promise` or whatever. I eventually moved away from this solution
and opted to use a library to build the requests manually; I don't want to
load natively captured images into the js context just for the network. I'm
using `react-native-fetch-blob`.
…On Thu, Jun 29, 2017 at 3:34 PM Komran Ghahremani ***@***.***> wrote:
@justinmakaila <https://github.com/justinmakaila> what's the right way to
remove the 'promise' library - just uninstall & unlink are not working for
me
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABkCVJlgj8DoHJFqJSdzifRQjryEhHjkks5sI_w3gaJpZM4OBJWu>
.
|
Same issue. |
@jared-clarifai any update when it will be fixed? |
Howdy all! I have been fiddling around for a bit and I am curious if this will have any impact to what you are doing. I have also tried this on two different node versions:
|
This appears to happen because As an interim fix you can do |
I'm using React Native 0.42 and clarifai 2.5.0 and still get this issue. The main reason I updated clarifai is to use the apiKey auth instead of giving a secret key. I've tried removing The workaround: EDIT: this workaround didn't work after all :( ... I'm getting promise errors now ... |
@Eyesonly88 @vigzmv I'm unable to reproduce this on a new React Native project. Steps that succeed:
process.nextTick = setImmediate
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Clarifai from 'clarifai'
const app = new Clarifai.App({
apiKey: 'CLARIFAI_API_KEY'
})
export default class App extends React.Component {
componentDidMount() {
app.models.predict(Clarifai.GENERAL_MODEL, 'https://ulmhawkeyeonline.com/wp-content/uploads/2017/11/puppy-development-300x200.jpg')
.then(res => console.log(res.outputs[0].data))
.catch(err => console.error(err))
}
render() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<Text>Changes you make will automatically reload.</Text>
<Text>Shake your phone to open the developer menu.</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Could you please try the above or provide steps to reproduce? |
I tried the above, and also tried with |
clarifai__WEBPACK_IMPORTED_MODULE_7___default.a.app is not a constructor I got this error what should i do? |
I wrote a little consumer for the
clarifai
API that utilizes this library. Unfortunately, whenever I try to use it, it crashes with a red screen:The client looks like this (currently, which resulted in the red screen, with no implementation):
The crash seems to happen if I try to create a new instance of
Clarifai.App
. I'm on version2.1.8
usingyarn 0.24.6
The text was updated successfully, but these errors were encountered: