Invalid module name in augmentation
Hi,
In visual studio, i got this error in every d.ts file under node_modules\rxjs\add\observable\ : Invalid module name in augmentation, module '../../Observable' cannot be found. example code: declare module '../../Observable' {
how to fix that please?
can you share a sample project we can look at?
did visual studio 2015 uses latest typescript release? Rxjs 5 uses module augumentation introduced at 1.8 (https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#augmenting-globalmodule-scope-from-modules ) ?
Same problem here.
Same here, "rxjs": "5.0.0-beta.6" as well as beta.7 VS 2015 with Update 2 and all installed updates. TS version is of course >1.8
Installed the latest 1.8.6 download from Microsoft as a VS extension experiencing the same issue...
How do I point Visual Studio to use the local version of Typescript installed locally within my project? (which I have 1.8.10 installed locally)
@bcrigler no way to point VS to use local TypeScript compiler. We have to wait next extention update. Or you can separate your web project into VS Code project + Service project for C# logic and use local TS with VS code.
Do not do this if you have Update 3 RTM installed
I see the issue now. this is a duplicate of https://github.com/Microsoft/TypeScript/issues/7415, and should be fixed in the next release (see https://github.com/Microsoft/TypeScript/pull/7507).
As work arounds for now, you can replace C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\typescriptServices.js with the file in https://raw.githubusercontent.com/Microsoft/TypeScript/Fix8518/lib/typescriptServices.js. First take a local backup though.
Hi there @mhegazy ... I tried your suggestion... but now when I try to open the project I get the error "API version mismatch: manager version 0.4, script version 0.5"... any ideas? thanks
"
What version of VS are you using? update 2?
@mhegazy ... no i am using update1... i guess i should be using update 2 correct???
correct.
Got it working with the "workaround". Thank you @mhegazy !!!
@mhegazy This fixed the problem for me ^_^
Can confirm, solution by @mhegazy works with rxjs 5.0.0-beta.6
+1 conformed, solution of @mhegazy works, except for that I had to modify node_modules\typescript\lib\typescriptServices.js under my project folder instead of C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\typescriptServices.js.
Is this a typescript bug then? If so, will it be fixed in the next version, and is this the right fix?
@mcanic I've got it working under C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\typescriptServices.js.
It's not a bug, it's a missing feature in current VS tools version.
I'm sure you are right, because I saw that the tsc command compiled fine, but I don't get how this can be a missing feature in the current VS tools version?
Update: of course: it is not typescript, it IS the VS extension itself where the fix was applied, I get it now. Should we report this bug somewhere?
this is a duplicate of #7415, and should be fixed in the next release (see #7507).
Hi @mhegazy it is possible to refresh VS2013 in order to apply the same fix ?
you can use the same steps in https://github.com/Microsoft/TypeScript/issues/8518#issuecomment-217960231 for VS 2013, the location would be C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TypeScript\typescriptServices.js (12.0 instead of 14.0 in the path).