The reason for this problem is that allowjs is turned on.
Because allowjs allows typescript compiler to compile JS. The compiled output file, namely XXX. JS, is the same as the source file.
So an error like “input file will be overwritten” will be reported.
In fact, we use third-party packaging tools such as webpack for our daily development. The compilation output is the responsibility of TS loader, so it is not necessary to care about the output of each TS file.
In this case, noemits can be set to true
true
No Emit –
Do not emit compiler output files like JavaScript source code, source-maps or declarations.
This makes room for another tool like Babel, or swc to handle converting the TypeScript file to a file which can run inside a JavaScript environment.
You can then use TypeScript as a tool for providing editor integration, and as a source code type-checker.
In addition, you can specify the output directory to avoid conflicts.
For more details, please refer to https://github.com/kulshekhar/ts-jest/issues/1471
Read More:
- [Solved] KEIL Error: source file ‘.XXX.o‘ – object file renamed from ‘XXX.o‘ to …
- Python read / write file error valueerror: I/O operation on closed file
- Securityerror: error ᦇ 2148: SWF file XXX cannot access local resources, only file system only
- If you want to open more than one program “pdc140.xxx”, the CL.EXE To write to the same. Pdb file, please use
- Fileexistserror: [winerror 183] cannot create a file when it already exists. File rename code attached
- R load(xxx.Rdata) Error bad restore file magic number (file may be corrupted) — no data loaded
- Vue introduction path is correct, but it always reports an error: already included file name‘ ××ב differs from file name ‘ ××ב only in casing.
- Vs2017 cannot open the source file “XXX. H” by adding a file name after creating a new class
- When a system is deployed on weblogic12.2.1.3, it reports an error “IllegalStateException zip file closed”. When it is deployed on weblogic12.2.1.2, it does not report an error and can be accessed normally.
- The first time I write OpenGL program, what should I do when I encounter “can’t open include file:” GL / glaux. H “: no such file or directory”?
- [unable to read project file xxxxx, XXX failed to load project file, name cannot start with “<" character (hex value 0x3c)] exception handling method
- iOS Failed to find matching arch for 64-bit Mach-O input file
- [Linux] e297: write error in swap file solution
- write error in swap file problem solving
- When using quartus for function simulation, “testbench” appears_ vector_ input_ The solution of “file option does not exist”
- Solution of no input file specified. In local server Apache
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- File contains no section headers. File: File: / / etc/ yum.repos .d/
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- [!] Invalid `Podfile` file: syntax error, unexpected end-of-input, expecting keyword_end.