![](/img/trans.png)
[英]Where to put file in react-native project, so i can access it with react-native-fs (Android)
[英]Where can I find tsconfig.json file in my react native project
我收到此消息“找不到模塊‘react-geocode’的聲明文件。” 所以我試圖修改 tsconfig.json 但找不到它在哪里
在項目文件夾的根目錄中,您可以擁有 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"
]
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.