You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building the nativescript-cloud package fails with error:
```
node_modules/nativescript/lib/services/analytics/analytics.d.ts(67,9): error TS2304: Cannot find name 'AnalyticsLoggingMessageType'.
```
The problem is that the build of `nativescript-cloud` extension needs to get all interfaces from CLI and include them in the global scope of the `nativescript-cloud`, so it can be transpiled. Currently this is done by iterrating over all files in nativescript and searching for `.d.ts` files.
For each `.d.ts` file, we create a new entry in a `references.d.ts` file in the root of `nativescript-cloud`. When trying to transpile the project, it fails as one of the included references (`analytics.d.ts`) uses a type (enum in this case) that is not available in the included references.
Fix this by moving the enums to `.d.ts` files - this way the transpiled `.js` files will not change (TypeScript strips all const enums from produced `.js` by replacing the enum usage with the actual value) and the transpilation of `nativescript-cloud` will work as well.
0 commit comments