Typescript support: support / load user defined tsconfig.json for transpiling files
See original GitHub issueCurrent behavior:
index.spec.ts
import { forward } from '@apps/commons-e2e';
Fails with
Error: Cannot find module ‘@apps/commons-e2e’ from ‘e2e\src\integration’
Desired behavior:
ts-node
should load an user defined tsconfig.json
to find own path mappings.
Test code to reproduce
- create a
tsconfig.json
with a path mapping to a lib - create a spec file using this path mapping
- run cypress
Versions
4.4.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:18
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Documentation - What is a tsconfig.json - TypeScript
The tsconfig.json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig.json file...
Read more >TSConfig Reference - Docs on every TSConfig option
This includes generating a type for the import based on the static JSON shape. TypeScript does not support resolving JSON files by default:...
Read more >Documentation - tsc CLI Options - TypeScript
Flag Type Default
‑‑allowJs boolean false
‑‑allowUmdGlobalAccess boolean false
‑‑allowUnreachableCode boolean
Read more >Docs on every TSConfig option - TypeScript
The configuration from the base file are loaded first, then overridden by those in the ... TypeScript does not support resolving JSON files...
Read more >TSConfig Option: esModuleInterop - TypeScript
Turning on esModuleInterop will fix both of these problems in the code transpiled by TypeScript. The first changes the behavior in the compiler, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jennifer-shehane any update on the status for this one?
I just tried to upgrade to 4.4.0 and ended up with the same error.
Everything was working just fine with that version but if I try to take advantage of the new feature:
To have it working previously I had to do the following: