Я пытаюсь использовать пакет node-powershell в приложении app реакции. Я не могу назначить образец сценария узла-PowerShell в реагировать рендеринга. вот код, который я использую:
class App extends Component {
render() {
return (
$(document).ready(() => {
// Create the PS Instance
let ps = new powershell({
executionPolicy: 'Bypass',
noProfile: true
})
// Load the gun
ps.addCommand("Roads? Where we're going, we don't need roads.")
// Pull the Trigger
ps.invoke()
.then(output => {
console.log(output)
})
.catch(err => {
console.error(err)
ps.dispose()
})
})
)
}
}
export default App;
Я получаю эту ошибку
Objects are not valid as a React child (found: [object HTMLDocument]). If you meant to render a collection of children, use an array instead.
in App (at src/index.js:6)
Мой index.js выглядит следующим образом:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
Кто-нибудь может мне помочь с этим?