-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Pick up tsconfig from non-top-level folder #815
Comments
I have the same problem |
I also suffer the same problem。 |
I also have this problem. See this ticket for a repo which experiences this issue. |
I'm running into this while experimenting with ASP.NET Core + Vue. A common project layout would put a Vue project inside a .NET Core project. Here's a stripped down repo layout:
I know there are some limitations when it comes to handling multiple Vue projects in the same repo, but, for cases like the one above, there's only one Vue project and one My preferred layout would separate the Vue client and .NET Core projects completely, but most editors / IDEs struggle with it:
#424 might be a practical option for that type of layout, but when there's only one |
@ryanjaeb It seems to me that Vetur should adopt the same logic as TS itself: Navigate up the tree, one level at a time, until a Instead it seems to be using the opposite logic of starting at the project root and looking for a tsconfig. If one isn't found, it kacks out. |
I have a folder structure that looks like:
Every time I open a
The only way I've been able to get rid of these error messages is to place a dummy /tsconfig.json
Reiterating @jessehallam comment above, it would be nice if vetur could instead resolve the closest |
for me it's not exactly the same problem but if vue project is not in the root of vscode project there no inteliSence ... i have to open a new vscode and open vue project as root and all work great |
I have same issue |
I also have the issue where I have /backend and /frontend at the root level. Creating a dummy |
This is a particularly tough issue to deal with in monorepo workspaces, polluting the root of a shared project with a dummy |
The fix also doesn't seem triviable; Vetur only searches the workspace root for ts configurations. Adding a VSCode option to specify Vetur project root(s) would work. |
I ran into this issue because I'd used the Vue CLI to create my project. It creates the project folder below the folder I'm in. Because of this I had the parent folder open in VSCode as the root, so the tsconfig.json file wasn't the root of what I had open with VSCode. Closing that folder and re-opening the child folder fixed this issue. The reason for the issue was the same as @mythz described. Don't forget to move the .vscode, if you have one. |
I had mentioned that issue here #349 with a small modification to overcome this problem. https://github.com/vuejs/vetur/pull/349/files Latest binary is here |
I have the same problem. |
A solution is given above: #815 (comment) . |
Unfortunately the mentioned solution does not work for me. I am not using TypeScript in the project so I used a I have been unable to test whether the file actually has a project configuration, as I appear to have no |
This really really helps! |
Are there any plans to fix this issue? It pretty much makes using typescript impossible with vetur. |
Modification of the workaround; avoids most duplication: /tsconfig.json {
"extends": "./path/to/real/tsconfig.json"
} |
Are there any plans to fix this issue? It pretty much makes using typescript impossible with vetur. |
Agreed. But in the mean time, make sure not to miss @7sempra 's workaround. That's been working for me in the interim. |
@RizziFrank The workaround falls apart in monorepos, unfortunately. |
Putting a file in some place vetur is expecting it seems like a workaround rather than a solution. Is there any better way to resolve this yet? |
Just here to state my support for this. |
@eyalsk has funded $20.00 to this issue.
|
This comment has been minimized.
This comment has been minimized.
An anonymous user has funded $2.00 to this issue.
|
@eyalsk has funded $25.00 to this issue.
|
@egoist has funded $5.00 to this issue.
|
Any updates???? |
What about #1734 ? It's ready for almost 2 months now 😦 |
A workaround that probably works in cases where the problem is caused by using a vscode workspace with one Vue project and some other not-Vue projects: #424 (comment) |
An anonymous user has funded $10.00 to this issue.
|
@morkro has funded $5.00 to this issue.
|
For what's worth, a similar issue arose for the ESlint Extension for vscode: microsoft/vscode-eslint#196. Their solution was to detect based on package/eslintrc file locations, with a fallback that allows the user to explicitly name the working directories. I guess it's a tempting assumption to think that "vscode project folder", "git root folder", and "npm project folder" are often the same, but it's an incorrect one. |
Best way for monorepos at the moment may be a vetur.config.js like:
|
@nattyluke Could have been nothing at all with #1734... Maybe it's not too late (behind a property for instance)? I said In response to #2377 (comment). |
Went around in circles on this one. Seems there was a solution to the issue I was having based on the merged pull request above: https://vuejs.github.io/vetur/guide/setup.html#advanced Posting here in case others come across this thread as I did. |
I have the same problem |
Info
Version 1.24.0
Commit 6a6e02cef0f2122ee1469765b704faf5d0e0d859
Date 2018-06-06T17:35:40.560Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
OS: Version: Windows 10.0.17134 Build 17134
Vetur version: 0.12.5
Problem
Error:
{
"resource": "/d:/Users/Eyal/Projects/Clients/DigitalTV/Web/experiment/dashboard/src/views/Home.vue",
"owner": "generated_diagnostic_collection_name#0",
"code": "undefined",
"severity": 8,
"message": "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.",
"startLineNumber": 17,
"startColumn": 22,
"endLineNumber": 17,
"endColumn": 26
}
Image:
tsconfig.js file
Reproducible Case
mkdir experiment && cd $_
npm init
npm install -D
@vue/cli
./node_modules/.bin/vue create dashboard
I've used the following options:
code .
Then navigate to dashboard/src/views/Home.vue
IssueHunt Summary
Backers (Total: $279.00)
Submitted pull Requests
Become a backer now!
Or submit a pull request to get the deposits!
Tips
The text was updated successfully, but these errors were encountered: