Skip to content

Ability to use tsconfig and src folder in different location #5

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

Open
dkulchenko opened this issue Dec 5, 2017 · 4 comments
Open

Ability to use tsconfig and src folder in different location #5

dkulchenko opened this issue Dec 5, 2017 · 4 comments

Comments

@dkulchenko
Copy link

dkulchenko commented Dec 5, 2017

[Info  - 11:10:22] vscode-tslint: 'Path must be a string. Received undefined' while validating: /Users/daniilk/code/front/src/components/ForgotPassword.vue stacktrace: TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1324:5)
    at getParsedTsConfig (/Users/daniilk/.vscode/extensions/prograhammer.tslint-vue-1.4.2/server/server.js:544:127)
    at createProgram (/Users/daniilk/.vscode/extensions/prograhammer.tslint-vue-1.4.2/server/server.js:458:20)
    at /Users/daniilk/.vscode/extensions/prograhammer.tslint-vue-1.4.2/server/server.js:420:31
    at Generator.next (<anonymous>)
    at fulfilled (/Users/daniilk/.vscode/extensions/prograhammer.tslint-vue-1.4.2/server/server.js:7:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:109:7)

There is a tsconfig.json file in the project (<workspace root>/code/front <- in here). vue files in question are at <workspace root>/code/front/src/components/*.vue.

@prograhammer
Copy link
Owner

prograhammer commented Dec 5, 2017

Ah yeah, that's a flexibility problem. It wants your config at the workspace root and also wants src at [workspace root]/src. This is mentioned in the README. I'm looking to have v2.0.0 out in the next day or so (see this issue) so I'll take care of that then and close this issue then. Hang in there a bit more.

@prograhammer
Copy link
Owner

prograhammer commented Dec 5, 2017

@dkulchenko If you want a quick hack for the meantime, search for your .vscode/extensions/prograhammer... folder and open up server/server.js. If in latest version (v1.4.2), modify the line #518 (it's inside the resolveNonTsModuleName function) and hard code in the path to your src/ folder. Then restart the editor.

@prograhammer prograhammer changed the title Trying to set up tslint-vue, but getting an error running it on any .vue file Ability to use src folder in different location Dec 5, 2017
@prograhammer prograhammer changed the title Ability to use src folder in different location Ability to use tsconfig and src folder in different location Dec 5, 2017
@prograhammer
Copy link
Owner

prograhammer commented Dec 5, 2017

@dkulchenko And look at line #532 to hardcode a different location for tsconfig.json. Sorry for the inconvenience. Flexibility coming in version 2. Stay tuned.

@dkulchenko
Copy link
Author

That does the trick for now - thanks so much! Will wait eagerly for v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants