nstudio/nativescript-checkbox

Angular Demo

Opened this issue · 6 comments

I've been trying to get the angular version of the plugin to work in my own app, but so far I've been running into issues.
As part of troubleshooting I have tried to run the angular demo to see if that does work, but it does not.

I get the following troublesome output:

ERROR in Symbol ReactiveFormsModule declared in C:/Projects/Test-Environment/nativescript-checkbox/demo-ng/node_modules/@angular/forms/forms.d.ts is not exported from @angular/forms (import 
into C:/Projects/Test-Environment/nativescript-checkbox/demo-ng/app/app.module.ts)
File change detected. Starting incremental webpack compilation...
Hash: 487e16fc607cf2c76be1
Version: webpack 4.44.2
Time: 3921ms
Built at: 2020-09-23 11:47:58 AM
 3 assets
Entrypoint bundle = runtime.js vendor.js bundle.js
[./main.ts] 1.13 KiB {bundle} [built]
    + 329 hidden modules

ERROR in Symbol ReactiveFormsModule declared in C:/Projects/Test-Environment/nativescript-checkbox/demo-ng/node_modules/@angular/forms/forms.d.ts is not exported from @angular/forms (import 
into C:/Projects/Test-Environment/nativescript-checkbox/demo-ng/app/app.module.ts)

ERROR in node_modules/@nativescript/core/global-types.d.ts:1:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: ModuleType, 'audio', 'beacon', 'cspreport', 'download', 'embed', 'eventsource', 'favicon', 'fetch', 'font', 'form', 'frame', 'hyperlink', 'iframe', 'image', 'imageset', 'import', 'internal', 'location', 'manifest', 'object', 'ping', 'plugin', 'prefetch', 'script', 'serviceworker', 'sharedworker', 'subresource', 'style', 'track', 'video', 'worker', 'xmlhttprequest', 'xslt', HeaderInit, WeakRef

1 declare var global: NodeJS.Global & typeof globalThis;
  ~~~~~~~

  node_modules/@nstudio/nativescript-checkbox/node_modules/@nativescript/core/global-types.d.ts:1:1
    1 declare var global: NodeJS.Global & typeof globalThis;
      ~~~~~~~
    Conflicts are in this file.
node_modules/@nstudio/nativescript-checkbox/node_modules/@nativescript/core/global-types.d.ts:1:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: ModuleType, 'audio', 'beacon', 'cspreport', 'download', 'embed', 'eventsource', 'favicon', 'fetch', 'font', 'form', 'frame', 'hyperlink', 'iframe', 'image', 'imageset', 'import', 'internal', 'location', 'manifest', 'object', 'ping', 'plugin', 'prefetch', 'script', 'serviceworker', 'sharedworker', 'subresource', 'style', 'track', 'video', 'worker', 'xmlhttprequest', 'xslt', HeaderInit, WeakRef

1 declare var global: NodeJS.Global & typeof globalThis;
  ~~~~~~~

  node_modules/@nativescript/core/global-types.d.ts:1:1
    1 declare var global: NodeJS.Global & typeof globalThis;
      ~~~~~~~
    Conflicts are in this file.
node_modules/@nstudio/nativescript-checkbox/node_modules/@nativescript/core/global-types.d.ts:167:2 - error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.

167  'audio',
     ~~~~~~~

Steps to reproduce:

  1. Clone repo
  2. cd src
  3. npm run demo.ng.android

I assume the demo worked when releasing the 2.0.0 version, or on other machines. Can someone confirm this?

@BlueHunter99 looks like the skipLibCheck flag wasn't turned on for the demo-ng. I just pushed that change, it should skip over the node_modules so you don't get these errors. Let me know if it works after that.

That removed part of the issue I think, it now just shows:

ERROR in Symbol ReactiveFormsModule declared in C:/Projects/Test-Environment/nativescript-checkbox/demo-ng/node_modules/@angular/forms/forms.d.ts is not exported from @angular/forms (import into C:/Projects/Test-Environment/nativescript-checkbox/demo-ng/app/app.module.ts)

And then it freezes.

I have fixed the issues I was having with the plugin by copying the code over into a fresh plugin workspace and have managed to fix it there. So my issue is done for now.
But I can image you'd still wanna fix it for other users of the plugin and the demo.

Yea, would be great if you could help fix this up :)

When I find some time today or tomorrow I'll compare the two projects and see if I can find what's causing the issue.

@bradmartin tbh I have no clue what is causing the issues.
I think it might be worth it to migrate this plugin to the new plugin workspaces format. Just let me know if you'd like me to make a pull request for that.

Any update on the same. I'm not able to find any library for checkboxes functionality. any suggestions would be appreciated.