skip to Main Content

my problem is like this

// @generated by expo-module-scripts
{
  "extends": "expo-module-scripts/tsconfig.base",
  "compilerOptions": {
    "outDir": "./build"
  },
  "include": ["./src"],
  "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__stories__/*"]
}

desciription
Path to base configuration file to inherit from. Requires TypeScript version 2.1 or later.
File ‘expo-module-scripts/tsconfig.base’ not found.ts

4

Answers


  1. I also had this error with another expo module, try restarting vs code and see if the problem is correct.
    it worked for me, probably an IDE bug

    Login or Signup to reply.
  2. my problem solved by install types/react-native

    yarn add @types/react-native@~0.70.6
    

    or

     npm install  @types/react-native@~0.70.6
    

    it is my package.json:

     "@types/react-native": "~0.70.6",
        "expo": "~47.0.12",
        "expo-status-bar": "~1.4.4",
        "react": "18.1.0",
        "react-native": "0.70.5"
    

    tsconfig.js must like:

    {
      "compilerOptions": {
        "experimentalDecorators": true,
        "forceConsistentCasingInFileNames": true,
        "isolatedModules": true,
        "lib": [
          "ESNext"
        ],
        "noEmitHelpers": true,
        "noFallthroughCasesInSwitch": true,
        "noImplicitReturns": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "strict": true,
        "jsx": "react-native"
      },
      "exclude": [
        "node_modules"
      ],
      "extends": "expo/tsconfig.base"
    }
    
    Login or Signup to reply.
  3. I think maybe the VSCode cant sync the new ts-config file. So in my case I re-opend the VSCode and it worked.

    Hope this solution is helpful and sorry about my English not good.

    Login or Signup to reply.
  4. Try closing and reopening your IDE.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search