I created a Meteor-Ionic2 project based on Whatsapp tutorial.
It was all working good, untill some recent updation with either Meteor or Ionic messed up and started throwing errors on ionic serve
. I am not sure what caused the issue. But here is the problem. When i do ionic serve
, I am getting this:
[14:52:41] watch started …
[14:52:41] build dev started …
[14:52:41] clean started …
[14:52:41] clean finished in 64 ms
[14:52:41] copy started …
[14:52:41] transpile started …
[14:53:00] typescript: node_modules/@types/meteor/index.d.ts, line: 666
Duplicate identifier ‘Status’.
L665: status: Status; L666: retryCount: number; L667: retryTime?: number;
[14:53:00] typescript: node_modules/@types/meteor/index.d.ts, line: 704
Duplicate identifier ‘Status’.
L703: status: Status; L704: retryCount: number;
[14:53:00] typescript: node_modules/meteor-typings/1.3/main.d.ts, line: 657
L705: retryTime?: number;
Duplicate identifier 'Status'.
L657: type Status = 'connected' | 'connecting' | 'failed' | 'waiting' | 'offline';
[14:53:00] typescript: node_modules/meteor-typings/1.3/main.d.ts, line: 695
Duplicate identifier 'Status'.
L695: type Status = 'connected' | 'connecting' | 'failed' | 'waiting' | 'offline';
[14:53:00] transpile failed
[14:53:00] dev server running: http://localhost:8100/
From the logs, I looked into
node_modules/@types/meteor/index.d.ts
node_modules/meteor-typings/1.3/main.d.ts
and found both the files had this declaration of DDP module,
declare module DDP {
interface DDPStatic {
subscribe(name: string, …rest: any[]): Meteor.SubscriptionHandle;
call(method: string, …parameters: any[]): void;
apply(method: string, …parameters: any[]): void;
methods(IMeteorMethodsDictionary: any): any;
status(): DDPStatus;
reconnect(): void;
disconnect(): void;
onReconnect(): void;
}
function _allSubscriptionsReady(): boolean;
type Status = ‘connected’ | ‘connecting’ | ‘failed’ | ‘waiting’ | ‘offline’;
interface DDPStatus {
connected: boolean;
status: Status;
retryCount: number;
retryTime?: number;
reason?: string;
}
function connect(url: string): DDPStatic;
}
which is throwing that error on ionic serve
.
When I comment declaration from any of the file, everything is working good, but I dont want to update anything manually inside node_modules.
Is there any mis configurations that I did, which is causing this issue?
Pls help.