inflearn logo
강의

Course

Instructor

Applying TypeScript to React while learning while making web games

useCallback typing

webpack.config.ts/ Could not find a declaration file for module '@pmmmwh/react-refresh-webpack-plugin'.

590

Gia

1 asked

0

 

 

안녕하세요, 강좌를 따라가던 중 오류가 생겨 질문드립니다.

분명  @pmmmwh/react-refresh-webpack-plugin  해당 모듈이 package.json에 설치가 된 것은 확인 했는데 , 자꾸 아래의 에러가 뜹니다.

Could not find a declaration file for module '@pmmmwh/react-refresh-webpack-plugin'. 'C:/Users/banan/Documents/공부/training-publish/typescript/ts-react/lecture/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/pmmmwh__react-refresh-webpack-plugin` if it exists or add a new declaration (.d.ts) file containing `declare module '@pmmmwh/react-refresh-webpack-plugin';`
ts(7016)

 

이런 경우 어떻게 해야할까요?

 

 

typescript react

Answer 1

0

zerocho

이건 좀 이상하네요 몇 버전인가요?

저 라이브러리는 타이핑이 되어 있습니다.

0

Gia

 
        "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4",

버전이 이거 말씀이신가요?

0

zerocho

네네 근데  지금 버전 제대로 설치되어 있습니다.

0

Gia

의아한게.. 같은 작업 내용을 깃허브로 공유해서 회사에서 다시 확인해보니 (npm i -D)  이번엔 해당 오류가 사라지고 fork-ts-checker-webpack-plugin 모듈을 찾을수없다고 나오네요. ㅠㅠ 왜 같은 패키지를 이용했는데 서로 다른 오류가 나오는 걸까요?

0

zerocho

뭔가 설치과정중에 꼬여서 특정 모듈만 제대로 설치가 안 된 겁니다. 개별 모듈을 다시 설치하세요.

express response 타입

0

210

1

createRoot

0

285

1

babel-loader질문입니다! 왜쓰는지 궁금합니다!

0

685

1

undefined 처리

0

493

1

compilerOptions lib 관련

0

329

1

event type 찾기

0

324

1

정확한 type vs 가독성

0

292

1

useRef에 대해 질문드립니다.

0

305

1

tsx파일에서 에러 표시

0

864

1

Props type 질문드립니다.

0

227

1

18버전에서의 ReactDOM.render

1

658

1

깃허브에 react-router@6 업데이트 해주신 코드 질문드립니다.

0

294

1

2강 끝말잇기 npx webpack 오류가 질의사항

0

408

1

Property 'render' does not exist on type 'IntrinsicAttributes & (PathRouteProps | LayoutRouteProps | IndexRouteProps)'.

0

716

1

webpack.config.ts import 할 때 에러좀 봐주세요!!

0

307

1

React.FC에 대해 궁금합니다.

0

701

1

가위바위보 interval 타입과 이벤트타입에 관한질문

0

343

1

npm run dev 실행은 성공적으로 되는데

0

677

2

redux 유료강좌를 듣고 와야 되는지 여쭈어보려고 합니다.

0

320

1

git 내용과 강의 내용이 달라서 여쭈어봅니다.

0

223

1

Ball.tsx 타이핑

0

324

2

react-router 버젼 업그레이드 변경사항 문의

0

286

2

리액트 타입스크립트 공식문서

0

338

1

button 클릭 할 떄 마다 더보기/닫기 에러

0

856

1