title: Regarding Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead
body: <p>I am running jest with enzyme but I am getting the above warning specifically from react-router dependency in the class I am trying to test. My question is why I am getting this warning as I have already downgraded my react version to 15.1.1. </p>
  
  <pre><code>Package.json
   "dependencies": {
      "axios": "^0.16.1",
      "babel": "^6.23.0",
      "babel-polyfill": "^6.23.0",
      "babel-preset-es2015": "^6.9.0",
      "babel-preset-react": "^6.5.0",
      "bootstrap": "^3.3.5",
      "boron": "^0.2.3",
      "browserify": "^13.0.1",
      "connect-history-api-fallback": "^1.2.0",
      "debounce": "^1.0.0",
      "envify": "^3.4.0",
      "es6-promise": "^3.2.1",
      "font-awesome": "^4.6.3",
      "jquery": "^2.2.4",
      "jwt-decode": "^2.2.0",
      "minimist": "^1.2.0",
      "node-fetch": "1.6.3",
      "node-notifier": "^4.6.0",
      "object-assign": "^4.1.0",
      "react": "^15.1.0",
      "react-autosuggest": "^3.8.0",
      "react-dnd": "^2.1.4",
      "react-dnd-html5-backend": "^2.1.2",
      "react-document-title": "^2.0.3",
      "react-dom": "^15.1.0",
      "react-dropdown": "^1.0.4",
      "react-quill": "^0.4.1",
      "react-router": "^2.4.1",
      "react-select": "^1.0.0-beta13",
      "react-select2-wrapper": "^0.6.1",
      "react-tag-input": "^3.0.3",
      "reflux": "0.4.1",
      "request": "^2.81.0",
      "request-promise": "^4.2.0",
      "toastr": "^2.1.0",
      "underscore": "^1.8.3",
      "vinyl-source-stream": "^1.1.0",
      "watchify": "^3.7.0",
      "webpack": "^2.4.1",
      "whatwg-fetch": "^1.0.0"
    },
    "devDependencies": {
      "babel-core": "^6.24.1",
      "babel-jest": "^6.0.1",
      "babel-loader": "^7.0.0",
      "babelify": "^7.3.0",
      "css-loader": "^0.28.0",
      "del": "^2.2.0",
      "enzyme": "^2.1.0",
      "eslint": "^3.19.0",
      "eslint-config-defaults": "^9.0.0",
      "eslint-loader": "^1.7.1",
      "eslint-plugin-react": "^6.10.3",
      "extract-text-webpack-plugin": "^2.1.0",
      "file-loader": "^0.11.1",
      "identity-obj-proxy": "^3.0.0",
      "jest": "^15.1.1",
      "jest-cli": "^15.1.1",
      "less": "^2.7.2",
      "less-loader": "^4.0.3",
      "node-sass": "^4.5.2",
      "react-addons-test-utils": "^15.1.1",
      "react-bootstrap": "^0.29.5",
      "regenerator-runtime": "^0.10.5",
      "sass-loader": "^6.0.3",
      "scss-loader": "0.0.1",
      "url-loader": "^0.5.8",
      "yargs": "^7.1.0"
    },
  </code></pre>
  
  <p>The full stack trace of error is:</p>
  
  <pre><code>console.error node_modules\fbjs\lib\warning.js:36
      Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
  
   FAIL  web\test\testClass.test.js
    ● Test suite failed to run
  
      Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
  
        at CustomConsole.Object.&lt;anonymous&gt;.console.error (web\test\jestSetup.js:12:11)
        at printWarning (node_modules\fbjs\lib\warning.js:36:17)
        at warning (node_modules\fbjs\lib\warning.js:60:22)
        at Object.get [as PropTypes] (node_modules\react\lib\React.js:95:49)
        at Object.&lt;anonymous&gt; (node_modules\react-router\lib\InternalPropTypes.js:9:18)
        at Object.&lt;anonymous&gt; (node_modules\react-router\lib\PropTypes.js:12:26)
        at Object.&lt;anonymous&gt; (node_modules\react-router\lib\index.js:15:19)
        at Object.&lt;anonymous&gt; (web\js\components\common\toolBar.jsx:2:20)
        at Object.&lt;anonymous&gt; (web\test\testClass.test.js:5:16)
        at process._tickCallback (internal\process\next_tick.js:103:7)
  </code></pre>
  
  <p>I dont want to upgrade from Router v2 to latest version 4 as I have to do lot of upgradation in my code. Why this error is coming although I am not using latest version of React where this package was moved from 'react' to 'prop-types'.</p>