delegateas/XrmDefinitelyTyped

error TS2649: Cannot augment module 'Xrm' with value exports because it resolves to a non-module entity.

BarrieSharp opened this issue · 2 comments

I have generated my typings which are in my project. I am getting error TS2649. I cannot find anything that helps me understand what it means. Should I be adding something specific in the config? If so, could you include a sample in the Wiki.

Also, what project template was used in Visual Studio? I have used Blank Node.js Web Application but that doesn't include nuget.

Could you elaborate on the issue you're experiencing. Preferably with a minimal code example? Based on the error message you're getting, I think your problem lies in trying to import XRM. It is a namespace, not a module, meaning it shouldn't be imported, the appropriate file should just be loaded where needed.

I wasn't explicitly trying to import XRM but I think the project template was doing something unexpected. I was using a blank node,js web application since that uses typescript but that has the import error. Also, the instructions were harder to follow on the wiki because it doesn't support nuget.

I managed to get it to work on a standalone ASP.net Core Web App project which supports the nuget workflow. The only downside is it defaults to F# creating new items so I have to just change the extension. That's why I wanted to know what VS template would be optimal. Other than that, I used the same tsconfig and ts for both templates.