question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error TS5083: Cannot read file 'project/.nuxt/tsconfig.json'.

See original GitHub issue

Environment

github actions

Reproduction

  • create Nuxt project with nuxi and vite
  • install test framework (form me it is jest)
  • rune yarn test before yarn dev

Describe the bug

It seems like i can’t run a test before I run the initial dev setup yarn dev, because ts-config.json extends from .nuxt/ts-config.json image

Additional context

No response

Logs

yarn run v1.22.17
$ jest
FAIL __test__/components/atom/h-switch.test.ts
  ● Test suite failed to run

    error TS5083: Cannot read file '/home/runner/work/project/.nuxt/tsconfig.json'.
    message TS151001: If you have issues related to imports, you should consider setting `esModuleInterop` to `true` in your TypeScript configuration file (usually `tsconfig.json`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.329 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
danielroecommented, Nov 15, 2021

@claranceliberi Once #1930 is merged, you can run nuxi prepare to generate that tsconfig.json before running your test suite.

1reaction
danielroecommented, Oct 9, 2022

If you are having an issue, please do not post on an old resolved issue. Create a new one with a reproduction, please 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Parsing Error: Cannot read file 'tsconfig.json' | bobbyhadz
To solve the error Parsing Error: Cannot read file 'tsconfig.json', update your `.eslintrc.js` file to set the `tsconfigRootDir` option to `__dirname` to ...
Read more >
214 - Stack Overflow
Parsing error: Cannot read file 'd:\test\testproject\tsconfig.app.eslint.json'.eslint One of the major issues I faced here because of the ...
Read more >
Setup - Nuxt TypeScript
Nuxt TypeScript Support mainly comes through a Nuxt module, @nuxt/typescript-build, ... but you'll need to configure typeRoots in the tsconfig.json file.
Read more >
Nuxt 3 build logs "unable to compile TypeScript" - Support
I still get the following error on deploy… error TS5083: Cannot read file '.nuxt/tsconfig.json'. this is how my tsconfig.json looks like { "extends":...
Read more >
cannot read tsconfig.json eslint - Code Grepper
Parsing Error: Cannot read file 'tsconfig. json ---> npm i @typescript-eslint/parser.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found