문제해결(Trouble shootings)
TS7016: Could not find a declaration file for module 'qs'. '/node_modules/.pnpm/
코딩하는고릴라
2023. 2. 8. 21:32
반응형
import qs from 'qs';
를 썼는데
TS7016: Could not find a declaration file for module 'qs'. '/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.js' implicitly has an 'any' type. If the 'qs' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qs'
에러가 발생함.
보통 타입이 없다고 에러가 뜨면서 아래처럼 타입 설치하라고
npm install --save-dev @types/qs
유도하는데,
pnpm 에러인지 괴상하게 뜨네요..
아래 @types/qs를 추가하여 해결하였습니다.
// pacakge.json
"@types/qs": "^6.9.7",
반응형