Reputation: 45
I get such an error on npm start on clarifai api [1]: https://i.sstatic.net/pHRNz.png
Open bootstrap:27:
// Execute the module function
try {
var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ };
__webpack_require__.i.forEach(function(handler) { handler(execOptions); });
module = execOptions.module;
execOptions.factory.call(module.exports, module, module.exports, execOptions.require);
} catch(e) {
module.error = e;
throw e;
}
// Flag the module as loaded
module.loaded = true;
// Return the exports of the module
return module.exports;
}
and my App.js details;
const app = new Clarifai.App({
apiKey: '****',
})
///
onButtonSubmit = () => {
console.log('click')
app.models
.predict(
'45fb9a671625463fa646c3523a3087d5',
'https://samples.clarifai.com/metro-north.jpg'
)
.then(
function (response) {
console.log(response)
},
function (err) {
//
}
)
}
I am getting this error before render in console.log. what would be the reason?
Happy coding day! :)
Upvotes: 2
Views: 488
Reputation: 64
As stated in the documentation you need to use Broserify. You are missing NodeJS globals. Please let us know if this does not work for you as this library is unfortunately not under active maintenance currently.
Upvotes: 1