-
Notifications
You must be signed in to change notification settings - Fork 236
Not detecting tsconfig.json (Sublime Text 3) #213
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
Comments
This is also reported in issue #180, which is marked as resolved. |
import {g} from 'test1'; file2: "./src/modules/deeperModule/deeperAgainModule/test1.ts", content: export var g = 0; tsconfig.json content: {
"compilerOptions": {
"module": "commonjs"
},
"files": [
"./src/modules/deeperModule/deeperAgainModule/test.ts",
"./src/modules/deeperModule/deeperAgainModule/test1.ts"
]
} I can get intellisense for @LPGhatguy The issue in #180 is different though. That one was caused by changes in the tsserver.js file that leads to the missing config file, even in the same directory. |
I'm also experiencing the same problem. I'll try to see if I can get more information about why. |
I'm actually experiencing this issue too, and my path to my entrypoint is |
The reason is that currently we don't have a file watcher for tsconfig.json, therefore you have to restart sublime to apply your changes From: Lucien Greathouse [email protected] I'm actually experiencing this issue too, and my path to my entrypoint is one/two/three/scripts/main.ts, with my deepest paths being one/two/three/scripts/Components/Core/component.ts. I get intellisense just fine, and I only get import/export errors sometimes, and I can't seem to reproduce when that happens. Reply to this email directly or view it on GitHubhttps://github.com//issues/213#issuecomment-123406494. |
I just opened my project fresh today (I just got to work) and I'm getting the same errors on one of my files -- I haven't changed |
@LPGhatguy Can you paste the content of your tsconfig.json file? Or do you see any error if you directly run |
I'm just using this file. I don't specify any files; is that a problem? {
"compilerOptions": {
"module": "commonjs",
"detectGlobals": false
}
} |
@LPGhatguy When I run tsc directly from the commandline, I got the error:
It seems your tsconfig file is not valid |
That could be the issue; that was an option I was passing through to a gulp TypeScript transpilation plugin. I'll let you know if I see the issue again with that config. |
I'm experiencing the same problem, but sometimes works sometimes not works. print(project_info) and body was empty {'seq': 0,
'command': 'projectInfo',
'type': 'response',
'body': {},
'request_seq': 7,
'success': True
} I dont know how tsserver works, someone can help me? |
I hit the issue again after refactoring my typing files to be inputs to the compiler instead of |
I have the same issue here. If my
|
Execute npm install typescript in the root folder, this will install the latest TypeScript compiler and should work. |
I had the same problem; I would get the error no matter where I would place a .ts file.
but running tsc on the command-line would not. This is because the tsserver.js from TypeScript-Sublime-Plugin doesn't recognize some options in the tsconfig.json, like emitDecoratorMetadata for example. TL;DR |
@summerwish That behavior sounds correct. If you are listing the files explicitly in the tsconfig.json, and the current file isn't one of them (or included/imported by one of them), then the current files isn't going to use that tsconfig.json. It's going to get its own context. @NeWbY100 Correct. The Sublime plugin ships its own version of tsserver.js, so if you want to use a specific version (i.e. one which may have features or behavior you depend on), then that needs to be specified. With these two issues, and the prior issue of an invalid compilerOption, that seems to be all the root causes of this issue. I'll close now, comment for further investigation if there are further causes not covered. Thanks! |
So why this is closed? TS plugin doesn't see my It doesn't see |
What about manually specifying path to |
Or some debug UI to find |
@NekR, can you share a sample we can look at? |
Echoing what @NekR is saying, I've tried the things mentioned above. |
OK, so I manually downgraded the plugin to v0.1.1, and it correctly picks up |
All right, I've resolved this. It was apparently basically the same issue face by @NeWbY100, however, the property that needed to be set has subsequently changed. Whereas @NeWbY100 set the following:
The property and usage have now changed to:
Note the absence of @NekR, I'd give this a shot and see if it works. |
I'm having a similar problem with a default installation of Sublime Text 3. I'm learning Angular 2. To set up a new project, I'm using angular-cli like this:
which sets up this directory structure: angular2_hello_world/ src/ app/ app.component.ts ...other files index.html tsconfig.json ...other files That is, my tsconfig.json is in the src/ folder, but outside the app/ folder. My source file, app.component.ts in in the app/ folder. When I open the source file, I see this error: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning. But that option is set to true in the tsconfig.json file, so I have to assume that my tsconfig.json is not being used. |
@johndeighan I think this is related to #542 |
+1 @johndeighan, I've been experiencing that exact problem recently (notably, sporadically) |
I have the file
./tsconfig.json
in the root folder of the project, with"modules": "commonjs"
set correctly.When editing any file 2 or more folders deep (e.g.
./src/journal/module.ts
), TypeScript reports an error for every import and export statement:This error doesn't show up for files under
./src
, and there are no module/import errors when building the project.Also mentioned in #207.
The text was updated successfully, but these errors were encountered: