본문 바로가기

Javascript, jQuery

react-vis-timeline 'isDataViewLike' 설치 오류 해결방법

반응형

react-vis-timeline 설치 오류 해결방법

 

 

vis-data를 찾을 수 없다는 오류와 'isDataViewLike'를 export할 수 없다는 경고... 딥빡

 

stackoverflow를 뒤져본 결과 vis-data 의 버전이 문제라는 것을 확인했다.

https://github.com/razbensimon/react-vis-timeline/issues/3

 

Running the examples · Issue #3 · razbensimon/react-vis-timeline

Overview Failure to compile examples Error message: ./node_modules/vis-timeline/esnext/esm/vis-timeline-graph2d.js Attempted import error: 'isDataViewLike' is not exported from 'vis-dat...

github.com

 

dependency의 vis-data 버전을 7.0.0으로 업그레이드 하면 된다.

 


node_modules -> react-vis-timeline 폴더에 들어가 package.json파일을 연다.

 

"vis-data": "^7.0.0" 부분을 직접 고치고 npm install 하면,,?

 

 


error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["src/**/*"]' and 'exclude' paths were '["node_modules"]'.

 

이 오류가 떴었다.  

 

 

이 오류는 package.json 이 있는 위치에 src폴더 생성 후 아무 내용 없는 .ts 파일을 하나 만들어주면 해결 된다.

 

 

++수정) typescript 버전 업때문인지

src/a.ts:1:1 - error TS1208: All files must be modules when the '--isolatedModules' flag is provided.

이런 에러가 떠서, 생성한 ts파일안에   export {}  를 적어주었다.

 

npm install이 성공하면 메인 폴더로 나가서 웹팩을 실행시켜본다.

 

 

 

+++수정)

으윽... 오류가 늘기만 해!

index.d.ts- error TS1005: ';' expected.

이 비슷한 오류가 나면 package.json 안의 타입스크립트 버전을 바꿔준다. (업글)

    "typescript": "^4.1.6"

 

그리고 다시 npm i

반응형