2017-02-21 1 views
0

반응이있는 앱에 대한 원격 디버깅을 설정하려고합니다. 모듈 remote-redux-devtools을 추가하고 가져 왔습니다. 누군가가 나는 다음과 같은 오류가 발생하고 이유를 알고 있습니까 : UnableToResolveError: Unable to resolve module remote-redux-devtools from /Users/.../src/store/createStore.js: Module does not exist in the module map or in these directories:....remote-redux-devtools 모듈을 확인할 수 없습니다.

그것은 node_modules 디렉토리 (node_modules/remote-redux-devtools)입니다.

+0

가져 오는 방법은 무엇입니까? –

+2

포장기를 다시 시작해야 할 수도 있습니다. 그랬습니까? – atlanteh

+0

어리석은 실수, 이건 고쳐졌습니다! 감사 – haxpanel

답변

0

모듈도 필요하지 않습니다. 상점을 만들면 composeEnhancers 함수를 정의하고 미들웨어에 적용합니다.

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose 

const store = createStore(
    ...reducers, 
    ...initialState, 
    composeEnhancers(
    ...middleware 
) 
) 
관련 문제