DamianEdwards / grunt-tsng

A TypeScript pre-processor for AngularJS
Apache License 2.0
29 stars 3 forks source link

Running the sample #7

Open OSUblake opened 10 years ago

OSUblake commented 10 years ago

While running the sample, I always get this error:

Running "tsng:dev" (tsng) task
Warning: File result for file app/app.ts doesn't have a module Use --force to continue
Aborted due to warnings

Am I overlooking something really simple here?

ghost commented 10 years ago

Getting similar issue on the MusicApp.SPA, did you find a fix?

OSUblake commented 10 years ago

Nope. I couldn't get that new MusicStore.Spa to work either.

abedon commented 10 years ago

You guys probably pulled down the source code in Unix style line ending ("\n"). Try to modify line #15 of the following file:

[Your Project Folder]\node_modules\grunt-tsng\tasks\tsng.ts

and hard code the "newline" variable to "\n".

DamianEdwards commented 9 years ago

Anyone still having this issue?

lucamorelli commented 9 years ago

right now I have this this issue trying to use the musicstore pipeline inside a asp.net project

Petteroe commented 9 years ago

I get this issue in a Visual Studio 2015 CTP6 project. I have a simple structure with a couple of model interfaces and a service implementation. When running the tsng task (config based on the AspNet5 MusicStore SPA sample) I get the following

    Running "tsng:dev" (tsng) task
    Warning: File result for file ng-app/components/Models/IAccount.ts doesn't have a module Use --force to continue.

I have tried the newline fix above, but no luck. Any help is greatly appreciated.

abedon commented 9 years ago

@Petteroe, if you send your code as a zip to [my account name @gmail.com], I can take a quick look.

Petteroe commented 9 years ago

@abedon, thank you for offering. I have sent you an email now with the zipped project.

Petteroe commented 9 years ago

Thanks to great help from @abedon, I have made this work. It was indeed a case of line endings. My solution had a mix of \n and \r\n endings. Once I got these cleaned up, it worked. Well, it worked after having made sure the src reference in my tsng.json was cleaned up to only include the .ts files I actually want compiled. Thanks again.

morgothulhu commented 9 years ago

I had the issue - \r\n and \n mixed. when applied the newline fix above, it worked. (CTP6).