Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic type 'ɵɵComponentDeclaration' requires 7 type argument(s). #148

Open
praveenjm opened this issue Feb 12, 2024 · 2 comments
Open

Comments

@praveenjm
Copy link

Getting this error while building the project, not sure what to do to resolve it. It was working fine with node 14.18.3, just to test some latest project, uninstalled this node version for some time and after reinstalling same 14.18.3 this error is occuring. Appreciate the help here.
✖ Compiling with Angular sources in Ivy full compilation mode.
node_modules/ngx-json-viewer/src/ngx-json-viewer/ngx-json-viewer.component.d.ts:23:18 - error TS2314: Generic type 'ɵɵComponentDeclaration' requires 7 type argument(s).
static ɵcmp: i0.ɵɵComponentDeclaration<NgxJsonViewerComponent, "ngx-json-viewer", never, { "json": "json"; "expanded": "expanded"; "depth": "depth"; "_currentDepth": "_currentDepth"; }, {}, never, never, false>;

@huhouhua
Copy link

I also encountered this problem
image

@enisz
Copy link

enisz commented Sep 8, 2024

I'm facing the same issue with "@angular/core": "12.2.16", "ngx-json-viewer": "3.2.1", and node version v16.20.2.

Error: node_modules/ngx-json-viewer/src/ngx-json-viewer/ngx-json-viewer.component.d.ts:23:18 - error TS2314: Generic type 'ɵɵComponentDeclaration' requires 7 type argument(s).

23     static ɵcmp: i0.ɵɵComponentDeclaration<NgxJsonViewerComponent, "ngx-json-viewer", never, { "json": "json"; "expanded": "expanded"; "depth": "depth"; "_currentDepth": "_currentDepth"; }, {}, never, never, false>;
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✖ Failed to compile.

Should I use another version of this package for this angular version?

[edit]

Never mind, it seems I've ignored this part of the readme:


# For Angular 4/5/6/7+:
npm install ngx-json-viewer@2

# For Angular 2:
npm install ngx-json-viewer@1

For my version of angular (12) version 2.4.0 is the latest supported version which works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants