Closed jwunder127 closed 7 years ago
@jwunder127 are you able to successfully use this library in your react-native project.Actually I am trying to use this in one of my project I am getting following transform error, can you please help me to sort this out. I am just using this simple syntax
var Clarifai = require('clarifai');
var app = new Clarifai.App(
'{clientId}', //my id
'{clientSecret}' //my secret
);
I solved my problem by installing version @2.0.9 and deleting .babelrc file from clarifai directory
I'm having the same issues with the latest version, i will try your solution @manjeets12
And for those of us who need a more recent version of the API ? We use the multi-language support that was rolled out in 2.1.2 I think. Any possible workaround ?
Howdy all (@jwunder127 @manjeets12 @ruiehq @ibussieres)! I wanted to check in and see if all your concerns were resolved?
@manjeets12 You may need to install the babel-preset-es2015
package npm install babel-preset-es2015 --save
. Let me know if since then your problem is resolved?
Specifically @ibussieres, I know that we introduced the multi-language support and I hope that in the latest build for 2.2.0
, you have everything working?
Yes @maxcell , we're all good !
I had an issue with version 2.1.4dev (which is currently the default module on npm). I'm using Clarifai with react native; following import, I got this error:
UnableToResolveError: Unable to resolve module
domain
from /Users/user/Documents/projectname/node_modules/asap/raw.js: Module does not exist in the module map or in these directories: /Users/user/Documents/projectname/node_modules , /Users/user/node_modules This might be related to https://github.com/facebook/react-native/issues/4968 To resolve try the following:watchman watch-del-all
.node_modules
folder:rm -rf node_modules && npm install
.rm -fr $TMPDIR/react-*
ornpm start --reset-cache
The problem here is domain has been deprecated in node.js but is used in asap@2.0.5 (a dependency of promise@7.1.1, which itself is a dependency of clarifai @2.1.4-dev). I was able to get around this issue by using clarifai@2.0.9, which uses a different promise library (I'm using yarn, the command was: yarn add clarifai@2.0.9).
Here's a screenshot of the old dependency tree
and the new dependency tree:
Summary: most recent clarifai release uses a library which uses a deprecated node module