-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
File is not being compiled while other files in the same directory ARE compiled #44845
Comments
It seems like the issue is related to project references. What is strange is why did this work for the first three files? Or, specifically the files named "Box", "BoxEncoding", and "core"? I came up with a workaround by renaming I still think this is a bug in the project references implementation in how it avoids performing duplicate compilation. I assume somewhere in the code, there is a Set of resolved input file paths so that it can remember if it's already compiled a file. In addition to the input file path, it should also consider the output path in the Set key. |
Me and my team ran into this issue. I don't have time to prepare a full bug report, but I will provide as much detail as possible to help this issue along. We were using project references, and were exporting 4 files in one of the referenced projects. One of the files was an We experienced strange behaviour: when the referenced project was built, all 4 files appeared in the local We learned that if we removed the We then learned that if we add the It appeared that the naming/casing of the file heavily influenced whether it would appear in the final That is all the info I can provide. If I get time I'll get a reproducible repo set up |
I've also experienced similar problem, now I have no idea what to do |
Solved, just tsconfig.json problem |
Please log a new issue with a concrete repro if possible. Thanks! |
@RyanCavanaugh FYI I've opened #58156 which I believe reproduces this. |
Bug Report
The TypeScript compiler will not compile any new files that I add to my
src
directory, but three older/existing files are compiled fine.See the GitHub repo below for context.
Under
packages/core/src
there are 4 .ts files and twotsconfig
files. Thetsconfig.json
file builds the directory to ES modules and thetsconfig.cjs.json
file builds the directory to CommonJS modules. After runningnpm install
, you can runnpm run compile
from the root of the Git repository and it will use project references to build all of the packages in the monorepo. After compiling, thedist
directory next to thesrc
directory SHOULD contain transpiled .js files for all 4 input .ts files. But for some reason, theBufferUtils.ts
file is left out and not compiled. However,BufferUtils
IS compiled successfully in CommonJS mode and put in thecjs
directory (next to thesrc
directory). And, better yet, the TypeScript compiler does not output a single error, just silently fails to output a .js file forBufferUtils
.I have tried:
BufferUtils.ts
toBufferUtil.ts
)aaa.ts
to see if that file would be compiled, and it WASN'T!My tsconfig.json files do not contain any "files", "include", or "exclude" directives. My monorepo uses a "solution"-based structure where the location of files relative to tsconfig.json files defines the build scoping. As far as I know, my configuration files are perfectly valid.
🔎 Search Terms
label:bug file not compile
🕗 Version & Regression Information
4.3.5
Also, tried nightly version
4.4.0-dev.20210701
⏯
Playground LinkGitHub repoGitHub repo
🙁 Actual behavior
Some files are being compiled, some aren't - all in the same directory with the same tsconfig.json
🙂 Expected behavior
All files in the directory should be compiled.
The text was updated successfully, but these errors were encountered: