【发布时间】:2020-02-14 05:44:02
【问题描述】:
我收到这条消息 “找不到模块‘react-geocode’的声明文件。” 所以我试图修改 tsconfig.json 但找不到它在哪里
【问题讨论】:
-
您的编辑器支持文件名搜索吗?如果是这样,您只需搜索文件名即可。
标签: android reactjs react-native native
我收到这条消息 “找不到模块‘react-geocode’的声明文件。” 所以我试图修改 tsconfig.json 但找不到它在哪里
【问题讨论】:
标签: android reactjs react-native native
在项目文件夹的根目录中,您可以拥有 tsconfig.json
如果你没有,那么创建一个如下截图
https://facebook.github.io/react-native/docs/typescript
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react",
"lib": ["es6"],
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "esnext"
},
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js",
"jest.config.js"
]
}
【讨论】: