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
experimentalDecorators Typescript warning always present #9335
Comments
This is the repo that I am using. |
What version of TS are you using? are you using the nightly build (https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Nightly%20Builds.md#visual-studio-code) ? |
I think this is potentially a duplicate of #8905. |
I am using "typescript": "^1.8.10" . Should I use a dev one? |
looks like a duplicate of #8905 then. can you give the nightly a try and see if it resolves the issue for you? here are the instructions: https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Nightly%20Builds.md#visual-studio-code. |
Problem still present with |
@giacomorebonato are you running El Capitan with case-sensitivity on your drive? @laurelnaiad was running into this over Gitter. |
My details:
Peculiarities:
I cannot say when either of these issues might have developed, since I've been using atom-typescript throughout -- every time I've tried to use VSCode I've not been able to get it to work, though I don't know if the same issue has been the reason each time. |
Sorry for all the mess.. I don't know why I was excluding all client code in tsconfig... Everything works know. |
@laurelnaiad looks like your tsconfig.json has errors or the file you are working on is not included in this tsconfig.json (either excluded or not in the folder). |
thanks @giacomorebonato for getting back to us on this. closing. |
Hi @mhegazy. Hmm. As far as I know, those statements aren't true.
I abbreviated the files and filesGlob. The first symptom -- which I only see in VSCode, not elsewhere -- is that a module like app/routing can't be located by vs code at 'app/routing' . But it can via a relative path './app/routing'. ... and the second symptom is this ghost experimentalDecorators error -- again, only in VSCode. I've tried it with or without the Is the above tsconfig invalid? (I mean, I don't mean to be pushy, but we've been building this app for a couple of months now, have a team of developers building it, people evaluating it, etc.. somehow it's all getting built with this tsconfig, just not in VScode 😄 ) |
So long as By the way @laurelnaiad, do you have a |
Wow, ok... tsc was unhappy.
I removed them, and it's much happier. It's odd that we have been going for months with those settings in place and building through gulp with no issues using our build process, but glad that's sorted out now. Thank you! |
Glad it is resolved. |
Ah, now I remember: |
This should not be used. If u r using it because of a gulp-typescript issue, then it should be addesed there. If this is a TS issue, I would love to hear more about the root cause and see what we can do to solve the issue. If you are using it because one of your input files is an output file as well, then I would expect that to be an easy fix. |
Well I do have several projects, and a few of them are interdependent. Is that what you mean by input files being output files as well? Within any single project, there aren't (to my knowledge), any such cases, but one project generates d.ts files that another project references. Is that my problem? |
Sorry, you gave three possible reasons why I might be using that flag... the reason I'm using it is that back when I was trying to figure out why the project wouldn't compile in atom-typescript, I tracked down this flag in the source code, and it looked perfectly designed for enabling me to move forward! :) , so I added it to atom-typescript's schema to allow it, thinking it was just missing from atom-typescript's schema. Ugh. I didn't realize the flag was intended to be private. I'm sorry about that. Still not clear on what I'm doing fundamentally wrong here with the project dependencies. |
One of my projects was referencing its own d.ts files. Sneaky. I'm sorry for the noise. |
Glad it was resolved @laurelnaiad! |
Guys I cannot also remove this warning from any of my projects. Literally tried everything, every project has different Let's focus on this:
I'm using |
Worked for me. |
For me, the problem was that my tsconfig.json file had a error/warning, "error TS18003: Build:No inputs were found in config file [...]". Once I resolved the error/warning, the "experimentalDecorators: true" setting worked as expected. |
Just listing my solution here if anyone faced the same problem I had where typescript fails to compile files that has the error Using VSCode 1.11.2 , Typescript 2.2.2
|
I confirm it, setting |
I'm just giving my two cents, make sure you have the right name, my file was |
Thank you @zxr90! For me just setting |
Well I feel stupid! Here's my ten cents .... my include path has been wrong for months! Now all my files look nice and clean :) |
It seems like the problem occurs if you "open a folder" where the config is not included. |
@Lafaa I can confirm this. |
Can also confirm I have this bug for a long time. Pretty annoying. |
Had this problem in a second project. The reason was that I had ".tsx" files, but my tsconfig was only set to include ".ts" files:
Once I added ".tsx" as an include pattern, the error went away in those files. |
I've just seen this warning in NON-TS project in VSCode. |
All it took for me was to open the tsconfig.json and update "lib": [ to "lib": [ |
Hi, just in case someone comes across this again: After putting the tsconfig.json in the root folder of my project the squiggly lines went away. |
I have read through most of the solutions on here and none of them have worked for me. Not sure what to do to fix this error. here is my tsconfig.json:
|
@offg777 Try changing "es2015" to "es2017", or match your VSCode with the same typescript version as the application you are currently working on. It is in your package.json file. |
@offg777 There's a bunch of guys who had already commented on how to do the rest. Just scroll up and check out the comments. |
I've tried several of the solutions here, and none are working for me. The editor was working fine until yesterday, and today, I am having this weird bug. Funny thing is I am using decorators at three different places, but it is only showing on one of them. If I create any new files that use decorators, it'll show the same error. Even when I try to modify and save the two working files, the errors won't show up on them. Not sure what's going... EDIT: Never mind, found the issue. It has to do with the "include". In my tsconfig, I have my files set at |
.vscode/settings.json |
For my part, I've always this error when I'm creating new files (eg using angular-cli). The error disappear when VSCode refresh the filesystem. You can force it by doing > File: Refresh Explorer |
Just to bring everything together: Step 1 from @offg777 =================== A SETTINGS EDITOR will open. On the left are default settings, on the right you can enter USER settings. STEP 2: Scroll down through the (white color) TOP LEVEL headings on the left until you come to TYPESCRIPT. Scroll down through the TYPESCRIPT settings until you find the following entry:
COPY this entry into USER SETTINGS on the right, and change "false" to "true" - so your USER SETTINGS now include the following entry: "javascript.implicitProjectConfig.experimentalDecorators": true If you have more than one user setting, separate them with commas at the end of the line as follows:: "javascript.implicitProjectConfig.experimentalDecorators": true, |
Ok. That helps a lot. Thanks |
Create tsconfig.json file in the root directory of your project and include the following options. |
Pulled my hair with this for a while. My problem was that i had the "src" folder open instead of the root folder in VSCode. Btw my tsconfig.json has |
I had the same problem with Visual Studio 2017. Have tried many solutions here but did not work. How to fix this in VS 2017 instead of Visual Studio Code. Thanks |
same problem on VS 2017, starting from a few days. |
Same problem here on mac and typescript 2.9.2 |
For similar reports, first please ensure your
If you are still running into problems, please file a new ticket, give us enough context to reproduce the issue locally, ideally a repro project, or a set of steps to recreate the project. Also please share your version of VSCode and version of TypeScript you are using. |
From @giacomorebonato on June 23, 2016 18:53
Steps to Reproduce:
I keep seeing the warning:
Where should I set this option? Because my tsconfig.json should be right
Copied from original issue: microsoft/vscode#8069
The text was updated successfully, but these errors were encountered: