title: Module not found: Can't resolve 'react/lib/React'
body: <p>I've been trying to run an existing React project that I found on Github. I've had some issues. First, I needed to update React to v 16.2.0 to get <code>React.Fragment</code> working. Now, having done the update, I'm getting this second issue:</p>
  
  <pre><code>./node_modules/react-dom/lib/ReactCompositeComponent.js
  Module not found: Can't resolve 'react/lib/React' in '/Users/sahandzarrinkoub/Documents/Programming/DH2642/Sentify/repo/Sentify/node_modules/react-dom/lib'
  </code></pre>
  
  <p>from the console:</p>
  
  <pre><code>index.js:2178 ./node_modules/react-dom/lib/instantiateReactComponent.js
  Module not found: Can't resolve 'react/lib/getNextDebugID' in '/Users/sahandzarrinkoub/Documents/Programming/DH2642/Sentify/repo/Sentify/node_modules/react-dom/lib'
  __stack_frame_overlay_proxy_console__   @   index.js:2178
  handleErrors    @   webpackHotDevClient.js:178
  ./node_modules/react-dev-utils/webpackHotDevClient.js.connection.onmessage  @   webpackHotDevClient.js:211
  ./node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @   eventtarget.js:51
  (anonymous) @   main.js:274
  ./node_modules/sockjs-client/lib/main.js.SockJS._transportMessage   @   main.js:272
  ./node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit @   emitter.js:50
  WebSocketTransport.ws.onmessage @   websocket.js:35
  </code></pre>
  
  <ol>
  <li>What is the reason for this bug?</li>
  <li>How to fix it?</li>
  </ol>
  
  <p>ADDITIONAL INFO:</p>
  
  <p><a href="https://i.stack.imgur.com/DE5vS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DE5vS.png" alt="enter image description here"></a></p>
  
  <p>Here is the project home folder. Here is the package.json file:</p>
  
  <pre><code>{
    "name": "Sentify",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "ajv": "^5.5.2",
      "cors": "^2.8.4",
      "dom": "0.0.3",
      "jquery": "^3.3.1",
      "jsdom": "^11.7.0",
      "mapbox-gl": "^0.44.1",
      "material-ui": "^0.20.0",
      "react": "^16.2.0",
      "react-d3-basic": "^1.6.11",
      "react-d3-core": "^1.3.9",
      "react-d3-shape": "^0.3.25",
      "react-dom": "^15.6.2",
      "react-router-dom": "^4.3.0-rc.2",
      "react-scripts": "1.1.1",
      "react-simple-pie-chart": "^0.5.0",
      "webpack": "^3.11.0"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test --env=jsdom",
      "eject": "react-scripts eject"
    },
    "devDependencies": {}
  }
  </code></pre>
  
  <p>I'm creating the node_modules folder by typing <code>npm install</code> and hosting with <code>npm start</code>.</p>
  
  <p>I removed node_modules and ran <code>npm install; npm start</code> again, and the error changed slightly to:</p>
  
  <pre><code>./node_modules/react-dom/lib/ReactMount.js
  Module not found: Can't resolve 'react/lib/React' in '/Users/sahandzarrinkoub/Documents/Programming/DH2642/Sentify/repo/Sentify/node_modules/react-dom/lib'
  </code></pre>
  
  <p>in console:</p>
  
  <pre><code>index.js:2178 ./node_modules/react-dom/lib/instantiateReactComponent.js
  Module not found: Can't resolve 'react/lib/getNextDebugID' in '/Users/sahandzarrinkoub/Documents/Programming/DH2642/Sentify/repo/Sentify/node_modules/react-dom/lib'
  __stack_frame_overlay_proxy_console__   @   index.js:2178
  handleErrors    @   webpackHotDevClient.js:178
  ./node_modules/react-dev-utils/webpackHotDevClient.js.connection.onmessage  @   webpackHotDevClient.js:211
  ./node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @   eventtarget.js:51
  (anonymous) @   main.js:274
  ./node_modules/sockjs-client/lib/main.js.SockJS._transportMessage   @   main.js:272
  ./node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit @   emitter.js:50
  WebSocketTransport.ws.onmessage @   websocket.js:35
  </code></pre>
  
  <p>Additional stack trace from console:</p>
  
  <pre><code>ReactDebugTool.js:14 Uncaught Error: Cannot find module "react/lib/ReactComponentTreeHook"
      at webpackMissingModule (ReactDebugTool.js:14)
      at Object../node_modules/react-dom/lib/ReactDebugTool.js (ReactDebugTool.js:14)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../node_modules/react-dom/lib/ReactInstrumentation.js (ReactInstrumentation.js:17)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../node_modules/react-dom/lib/ReactReconciler.js (ReactReconciler.js:12)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../node_modules/react-dom/lib/ReactUpdates.js (ReactUpdates.js:17)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../node_modules/react-dom/lib/ChangeEventPlugin.js (ChangeEventPlugin.js:15)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../node_modules/react-dom/lib/ReactDefaultInjection.js (ReactDefaultInjection.js:13)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../node_modules/react-dom/lib/ReactDOM.js (ReactDOM.js:14)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../node_modules/react-dom/index.js (index.js:3)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object../src/index.js (discover.js:19)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at fn (bootstrap f031d93a2683340d518f:88)
      at Object.0 (welcome.js:22)
      at __webpack_require__ (bootstrap f031d93a2683340d518f:678)
      at ./node_modules/ansi-regex/index.js.module.exports (bootstrap f031d93a2683340d518f:724)
      at bootstrap f031d93a2683340d518f:724
  </code></pre>