I am using urigo:angular2-meteor. When I add an empty main.ts in server folder, it always shows:
Cannot compile namespaces when the '--isolatedModules' flag is provided.
Even I added the code below on the top of main.ts, it still shows same thing.
/// <reference path="../typings/angular2-meteor.d.ts" />
I had the same problem and I added tsconfig.json
into the root directory of my project.
{ "compilerOptions": { "isolatedModules": false } }
I didn't have the time to dive into it, but it solved the problem.
I faced similar issue in react + ts. I had commented out all my code.
Turns out A global file cannot be compiled using '--isolatedModules'. Ensure your file contains imports, exports, or an 'export {}' statement.
So, added something like:
export const foo = 'foo';
or
export {}
It's a temporary solution, else you can delete the file with commented code or update tsconfig.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With