Typescript: node_modules/@capacitor/core/dist/esm/global.d.ts

Hi,
i have installed capacitor for using google maps component.
It’s ok on test server ionic “ionic serve” with some time this message:

Typescript Error

‘=’ expected.

node_modules/@capacitor/core/dist/esm/global.d.ts

declare const Capacitor: _Capacitor;
declare const Plugins: import("./core-plugin-definitions").PluginRegistry;
export { Capacitor, Plugins };

but compiling i receive this error:

[app-scripts] [14:49:17] deeplinks finished in 79 ms
[app-scripts] [14:49:17] transpile started …
[app-scripts] [14:49:20] typescript: node_modules/@capacitor/core/dist/esm/global.d.ts, line: 3
[app-scripts] ‘=’ expected.
[app-scripts] L2: declare const Capacitor: _Capacitor;
[app-scripts] L3: declare const Plugins: import("./core-plugin-definitions").PluginRegistry;
[app-scripts] L4: export { Capacitor, Plugins };
[app-scripts] [14:49:20] typescript: node_modules/@capacitor/core/dist/esm/global.d.ts, line: 3
[app-scripts] Cannot find name ‘import’.
[app-scripts] L2: declare const Capacitor: _Capacitor;
[app-scripts] L3: declare const Plugins: import("./core-plugin-definitions").PluginRegistry;
[app-scripts] L4: export { Capacitor, Plugins };
[app-scripts] Property ‘PluginRegistry’ does not exist on type ‘"./core-plugin-definitions"’.
[app-scripts] L2: declare const Capacitor: _Capacitor;
[app-scripts] [14:49:20] typescript: node_modules/@capacitor/core/dist/esm/global.d.ts, line: 3
[app-scripts] L3: declare const Plugins: import("./core-plugin-definitions").PluginRegistry;
[app-scripts] L4: export { Capacitor, Plugins };

my conf:

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.10
Angular Core: 5.2.11
Angular Compiler CLI: 5.2.11
Node: 8.11.3
OS Platform: macOS

1 Like

I also have this error. Do you happen to remember how you resolved it all that time ago @mixian?

EDIT: https://github.com/ionic-team/capacitor/issues/1526