簡體   English   中英

我在哪里可以在我的本機項目中找到 tsconfig.json 文件

[英]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"
  ]
}

在此處輸入圖片說明

在項目文件夾的根目錄中,您可以擁有 tsconfig.json

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM