I am trying to require shelljs in my core React component.
import React, { Component } from 'react';
import {render} from 'react-dom';
import Header from './components/Header';
const shell = require('shelljs');
class App extends Component {
render() {
console.log("First component mounting");
console.log("First component mounting");
return (
<Header />
)
}
}
render(<App />, document.getElementById('root'));
When I run
webpack build
I get no errors, then I run my server and I get the following console error.
I'm using jekyll as my server side. Currently transitioning from the normal jekyll implementation to React only. React is well implemented cause i tested the Header component before importing the shelljs module
ReferenceError: process is not defined
I'm new to using modules in javascript, thanks in advance.