【问题标题】:Where can I find tsconfig.json file in my react native project在我的 react native 项目中哪里可以找到 tsconfig.json 文件
【发布时间】:2020-02-14 05:44:02
【问题描述】:

我收到这条消息 “找不到模块‘react-geocode’的声明文件。” 所以我试图修改 tsconfig.json 但找不到它在哪里

【问题讨论】:

  • 您的编辑器支持文件名搜索吗?如果是这样,您只需搜索文件名即可。

标签: android reactjs react-native native


【解决方案1】:

在项目文件夹的根目录中,您可以拥有 tsconfig.json

【讨论】:

    【解决方案2】:

    在项目文件夹的根目录中,您可以拥有 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"
      ]
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-29
      • 2013-09-13
      • 1970-01-01
      • 1970-01-01
      • 2013-04-25
      相关资源
      最近更新 更多