In the upcoming lecture, we will be installing the monaco-jsx-highlighter and jscodeshift libraries. Unfortunately, these libraries will break now that Create React App is shipping with Webpack v5. To avoid ejecting, or, installing 3rd party libraries to polyfill, the quickest solution is to downgrade CRA to v4.
Find the package.json file of your jbook project and edit the entry for react-scripts to be 4.0.1:
"react-scripts": "4.0.1",
An additional change is required to the start script as Node LTS is now on the 18 version.
"start": "react-scripts --openssl-legacy-provider start",
If you do not make this change, then, you will see a "digital envelope routines::unsupported" error.
Then, in the root of your project directory, run the following in your terminal:
rm package-lock.json
rm -r node_modules
npm install --legacy-peer-deps