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
TS6307 caused by ts files in excluded directory #27069
Comments
I tried making an
This results in error TS6307 for both the files in node_modules and the files I explicitly included from src. |
Can you make a sample repo or zip file? Lots of variables in play here and we'd like to jump straight to the problem. |
I am seeing similar behavior in a monorepo that uses
build output$ yarn build yarn run v1.9.4 $ tsc -b src error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/builder/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/config/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/contents/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/contents/validate.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/comm.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/default.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/future.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/kernel.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/manager.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/messages.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/serialize.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/kernel/validate.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/manager.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/nbconvert/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/serverconnection.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/session/default.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/session/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/session/manager.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/session/session.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/session/validate.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/setting/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/terminal/default.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/terminal/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/terminal/manager.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/terminal/terminal.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error TS6307: File 'c:/users/steve/temp/jupyterlab/packages/services/src/workspace/index.ts' is not in project file list. Projects must list all files or use an 'include' pattern. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
False alarm @RyanCavanaugh , we were missing the |
@RyanCavanaugh Can't reproduce with TypeScript 3.1.1. Think this must have been fixed. |
@udp this is an actual bug. I would reopen this. I found the exact line that is causing the issue: https://github.com/Microsoft/TypeScript/blob/7ed9e44055d31949f2b633284f7bf8eed4abff96/src/compiler/program.ts#L2587 For some reason if options.composite is true they check if processed files can be found on the path (they don't do that otherwise). If the module you depend on exports pure .ts files this will fail. I found a workaround for this: convert .ts to .d.ts... but I would rather see that fixed at some point. |
@chris-miaskowski Thanks. Dutifully reopening. |
Can you please provide repro so we can look into what best we can do? |
Might be the same issue as in: #25600 (comment) |
Repro here: https://github.com/unional/learn-a/tree/issue-27069 Run |
@unional this seems to work fine with drop from master.
Same result also with 3.1.3 |
Ignore earlier comment (where i forgot to checkout the branch). The repro is working as intended since src/foo.ts is included by the tsconfig and isnt listed in files/include array as mentioned in the error.
|
So, a bug is presented, @unional provides a repo that doesn't reproduce the bug, and the issue is closed as "Working as Intended"? I've created a repo that reproduces the bug: https://github.com/silentorb/typescript-project-test. A project I'm working on is currently running into this issue. We're trying to modify a yarn workspace to use TypeScript project references and are running into the same symptoms described by the OP when importing a third party TypeScript library I maintain: https://github.com/vineyard-bloom/vineyard-lawn. As an example, when building with tsc we get the following error:
The directory If the design of TypeScript project references is to not support third party libraries with .ts files, then that should be specified in the documentation: https://www.typescriptlang.org/docs/handbook/project-references.html#caveats-for-project-references. Note that the errors appear with or without the |
@silentorb I ran the build using typescript@next on https://github.com/silentorb/typescript-project-test and it runs without any errors and i think your issue should be fixed by #31191
|
I'm getting this with https://github.com/elm-tooling/elm-language-server/tree/d5887bfce2d39f5683b6b94cd612047a1a132c75 (be sure to init the git submodule) and typescript 3.5.1 on linux. |
TypeScript Version: 3.1.0-dev.20180913
Search Terms: TS6307
Code
For example:
node_modules
which contains.ts
files.node_modules
intsconfig.json
tsc -b -v
.Expected behavior:
As
node_modules
is excluded, the files should be ignored.Actual behavior:
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: