title: Uncaught TypeError: Cannot read properties of undefined (reading 'split')
body: <p>I'm using webpack, and I'm getting this error in the browser:</p>
  <pre><code>Uncaught TypeError: Cannot read properties of undefined (reading 'split')
      at eval (validator.js:15)
      at Object../node_modules/axios/lib/helpers/validator.js (main.bundle.js:1225)
      at __webpack_require__ (main.bundle.js:1673)
      at eval (Axios.js:8)
      at Object../node_modules/axios/lib/core/Axios.js (main.bundle.js:1005)
      at __webpack_require__ (main.bundle.js:1673)
      at eval (axios.js:5)
      at Object../node_modules/axios/lib/axios.js (main.bundle.js:961)
      at __webpack_require__ (main.bundle.js:1673)
      at eval (index.js:1)
  </code></pre>
  <p>There are no errors or warnings at compilation-time.</p>
  <p>Line 15 of validator.js looks like this:
  <code>var currentVerArr = pkg.version.split('.');</code></p>
  <p>There is this line at the top of the file:
  <code>var pkg = __webpack_require__(/*! ./../../package.json */ &quot;./package.json&quot;); </code></p>
  <p>So it looks like that __webpack_require is not working?</p>
  <p>How can I fix this?</p>