-
Notifications
You must be signed in to change notification settings - Fork 202
[TypeScript 2] Relative paths in typeRoots not resolved (tsconfig.json) #1055
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
Yes, I confirm it. My environment:
|
Also seeing the same thing. OSX, node v 5.1 |
Same thing here, none of the jasmine types are resolved. |
similar problem with angular2-seed project (mgechev/angular2-seed).
OS: Windows 7 |
Having the same problem with jasmine, but in VSCode. I don't know if ts plugin for VSCode and for atom are related, but looks suspicious... |
Same issue here. To fix this as a hack until plugin is changed, I pulled in the Seems dirty, but works and the Angular-cli project I am running does not care as it still looks to the |
Looks like this is the same issue I'm facing right now. Excluding In the screenshot you can see that [email protected] as well as [email protected] compile the same code without any problems (as it should be). Browserify with tsify don't throw any errors either. |
I am having the same issue as @iamolivinius. This issue only started when I migrated a few projects to go from storing typings in Not sure if this is new with typescript 2.0, but in tsconfig, if you don't set |
I think this is definitely a bug - or rather it had been implemented correctly and then the new functionality of TypeScript wasn't accounted for. PRs definitely accepted. |
This works as a temporary solution for me: "exclude": [
"!/node_modules/@types"
] |
Did not work for me in the angular2-seed project (mgechev/angular-seed) I mentioned. in
to
|
Without this we're getting an error while using ts-node on Windows. See TypeStrong/ts-node#168 TypeStrong/atom-typescript#1055 Note that this works around the issue but as far as I understand things it shouldn't be necessary.
+1 |
Using
|
@Shijir I can confirm removing the |
Hi,
I'm having trouble with type definitions being picked up using TypeScript 2/atom-typescript when the
tsconfig.json
is not in the same directory as node_modules. I have a src folder containingtsconfig.json
, refrencing../node_modules/@types
in the typeRoots, and a Jasmine test in src/app. atom-typescript does not pick up the Jasmine declarations (e.g.describe
,it
etc) and highlights them as errors.My folder structure is as follows (some folders removed):
My
tsconfig.json
insrc
is as follows:app.component.spec.ts
:Environment info:
OS: OS X El Capitan 10.11.6
Node.js: 6.3.1
Typescript: 2.0.0
Atom: 1.9.8
atom-typescript: 10.1.6
This configuration works with
tsc
on the command line (eithertsc -p src
in the project root, ortsc -p .
insrc
). It also works in atom-typescript if I put the entire path in typeRoots - e.g./Users/sean/someProject/node_modules/@types
- which makes me think that this is an atom-typescript specific issue in resolving relative paths.Is this a bug or just something I'm doing wrong with my config?
The text was updated successfully, but these errors were encountered: