This is my error In index.js Actually I tried to use window.process = {};
on the top of it but it didnt worked and also I tried to put the window.process = {}; on app.js it also didnt worked I dont know how I am getting error pls help me and let me know how to fix the error I am actually creating smart brain app with clarifai AI and I did everything right but I dont know why I am getting the blank screen as an output pls help
[1]: https://i.stack.imgur.com/1U5PV.png
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import 'tachyons';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
reportWebVitals();
This is my app.js
import './App.css';
import ParticlesBackground from './Components/ParticlesBackground/ParticlesBackground';
import Navigation from './Components/Navigation/Navigation';
import FaceRecognition from './Components/FaceRecognition/FaceRecognition';
import Logo from './Components/Logo/Logo'
import ImageLinkForm from './Components/ImageLinkForm/ImageLinkForm'
import Rank from './Components/Rank/Rank'
import { Component } from 'react';
import Clarifai from 'clarifai';
const app = new Clarifai.App({
apiKey: '41f76d4d2e2c4c5b8f6636e3f49737f6'
});
class App extends Component {
constructor(){
super();
this.state ={
input:'',
imageUrl:'',
}
}
onInputChange=(event) =>{
this.setState({input:event.target.value});
}
onButtonSumbit =()=>{
this.setState({imageUrl:this.state.input});
app.models
.predict(
Clarifai.FACE_DETECT_MODEL,
this.state.input)
.then(response => this.displayFaceBox(this.calculateFaceLocation(response)))
.catch(err => console.log(err));
}
render(){
return (
<div className="App">
<Navigation />
<Logo />
<Rank />
<ImageLinkForm onInputChange={this.onInputChange}
onButtonSumbit={this.onButtonSumbit}/>
<FaceRecognition imageUrl={this.state.imageUrl} />
<ParticlesBackground />
</div>
);
}
}
export default App;