acdlite / redux-router

Redux bindings for React Router – keep your router state inside your Redux store
MIT License
2.3k stars 200 forks source link

React 16.8.6 Error #295

Closed xianweics closed 5 years ago

xianweics commented 5 years ago

Version

"redux-router": "^2.1.2" "react": "^16.8.6"

Steps to reproduce

Use webpack to pack

Expected Behavior

Build Successfully

Actual Behavior

Got error:

Uncaught TypeError: Cannot read property 'node' of undefined
    at eval (ReduxRouter.js:56)
    at eval (ReduxRouter.js:112)
    at Object../node_modules/redux-router/lib/ReduxRouter.js (main.8a868.js:43891)
    at __webpack_require__ (main.8a868.js:767)
    at fn (main.8a868.js:130)
    at eval (index.js:13)
    at Object../node_modules/redux-router/lib/index.js (main.8a868.js:43951)
    at __webpack_require__ (main.8a868.js:767)
    at fn (main.8a868.js:130)
    at eval (store-dev.js:28)
    at Object../src/js/store/store-dev.js (main.8a868.js:47458)
    at __webpack_require__ (main.8a868.js:767)
    at fn (main.8a868.js:130)
    at eval (store.js:4)
    at Object../src/js/store.js (main.8a868.js:47446)
    at __webpack_require__ (main.8a868.js:767)

I will submit Pull Requests: In src/ReduxRouter.js file, change

import React, { Component  } from 'react';

to

import React, { Component } from 'react';
import PropTypes from 'prop-types'