Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error TS6053: File 'expo/tsconfig.base' not found. #4187

Open
4 tasks
solomonmulatu opened this issue Oct 24, 2024 · 0 comments
Open
4 tasks

fix: error TS6053: File 'expo/tsconfig.base' not found. #4187

solomonmulatu opened this issue Oct 24, 2024 · 0 comments
Labels

Comments

@solomonmulatu
Copy link

Steps to Reproduce

i am using commitlint inside Expo and then i got the following error



C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\ts-node\src\index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
error TS6053: File 'expo/tsconfig.base' not found.

    at createTSError (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\ts-node\src\index.ts:859:12)
    at reportTSError (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\ts-node\src\index.ts:863:19)
    at createFromPreloadedConfig (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\ts-node\src\index.ts:874:36)
    at create (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\ts-node\src\index.ts:624:10)
    at register (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\ts-node\src\index.ts:591:15)
    at TypeScriptLoader (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\cosmiconfig-typescript-loader\dist\cjs\index.js:52:54)
    at loadConfig (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\@commitlint\load\src\utils\load-config.ts:16:35)
    at load (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\node_modules\@commitlint\load\src\load.ts:25:33)
    at main (C:\Users\john\AppData\Roaming\npm\node_modules\@commitlint\cli\src\cli.ts:214:27) {
  diagnosticCodes: [ 6053 ]
}


and here is my commitlint config file 
module.exports = {
    extends: ['@commitlint/config-conventional'],
    rules: {
        'body-leading-blank': [1, 'always'],
        'body-max-line-length': [2, 'always', 100],
        'footer-leading-blank': [1, 'always'],
        'footer-max-line-length': [2, 'always', 100],
        'header-max-length': [2, 'always', 100],
        'scope-case': [2, 'always', 'lower-case'],
        'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
        'subject-empty': [2, 'never'],
        'subject-full-stop': [2, 'never', '.'],
        'type-case': [2, 'always', 'lower-case'],
        'type-empty': [2, 'never'],
        'type-enum': [
            2,
            'always',
            [
                'build',
                'chore',
                'ci',
                'docs',
                'feat',
                'fix',
                'perf',
                'refactor',
                'revert',
                'style',
                'test',
                'translation',
                'security',
                'changeset'
            ]
        ]
    }
};

and my ts config file 


{
    "compilerOptions": {
        "strict": true,
        "paths": {
            "@/*": ["./*"]
        },
        "noImplicitAny": false,
        "jsx": "react-native",
        "skipLibCheck": true,
        "esModuleInterop": true
    },
    "include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"],
    "exclude": ["node_modules", "dist", "logs", "**/*.spec.ts", "**/*.test.tsx"],
    "extends": "expo/tsconfig.base"
}

so can any one help me why i am getting this error

Current Behavior

No response

Expected Behavior

commitlint should pass this one and it should work

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

No response

commitlint --version

@commitlint/cli/19.50

git --version

2.38.1

node --version

20.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant