ERROR in ./tsconfig.json
./tsconfig.json
[tsl] ERROR
TS2688: Cannot find type definition file for 'axios'.
The file is in the program because:
Entry point for implicit type library 'axios'
ERROR in ./tsconfig.json
./tsconfig.json
[tsl] ERROR
TS2688: Cannot find type definition file for 'file-type'.
The file is in the program because:
Entry point for implicit type library 'file-type'
默认应该会在@types/file-type
下面, 查看有这个目录,但是里面的README.md说file-type自带了,不需要安装。
cat node_modules/@types/file-type/README.md
This is a stub types definition for @types/file-type (https://github.com/sindresorhus/file-type#readme).
file-type provides its own type definitions, so you don't need @types/file-type installed!%
所以卸载后试下
npm uninstall @types/file-type
npm uninstall @types/axios
yarn dev
正常了. 有点反直觉,你以为要安装,实际要卸载
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。