본문 바로가기

NPM/packages

[#. ngrok] undefined is not an object (evaluating 'b.apply') error 해결하기

반응형

 

 

 

 

 

ngrok을 이용해서 디바이스 기기에서 제공 주소로 들어가 화면을 확인하는 데까진 성공했다

하지만 다른 페이지로 이동하려고 클릭하는 순간 발생했다

(Node + React 기준으로 React 페이지에서 발생)

 

undefined is not an object (evaluating 'b.apply')

 

 

safari에서 접근하면 뜨는 에러라고 한다

 

index.js 수정

 

const store = createStore(persistedReducer, compose(
  applyMiddleware(ReduxThunk, promiseMiddleware),
  window.navigator.userAgent.includes('Chrome') ?	// 추가
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() : compose,
))

 

 

 

chrome인지 체크하는 코드를 추가하고 해결했다

 

 

 

 

 

 

 

 

 

 

 

아래를 참고했다

 

https://github.com/reduxjs/redux/issues/2033

 

Redux compose "TypeError: undefined is not an object (evaluating 'last.apply')" · Issue #2033 · reduxjs/redux

Hey guys. I'm just building the dependencies in a project made with react/redux. And when webpack bundle the main file, the error: "TypeError: undefined is not an object (evaluating 'l...

github.com

 

반응형