Skip to content

Using generic-table with nx workspace #319

Description

@TKMafunga

I am trying to install the table, however, when l try to use it within the nx project, l face a number of errors. The error l receive is shown below:

Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Unable to write a reference to GtRow in C:/Users/mafun/Documents/GitHub/medicalrcs/mrcs-workspace/node_modules/@angular-generic-table/core/lib/interfaces/gt-row.d.ts from c:/users/mafun/documents/github/medicalrcs/mrcs-workspace/libs/admin/medical-practices/src/lib/components/medical-practices-table/medical-practices-table.component.ngtypecheck.ts
at ReferenceEmitter.emit (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\imports\src\emitter.js:85:19)
at TypeCheckFile.Environment.referenceType (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\environment.js:133:42)
at TypeEmitter.emitReference (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\environment.js:141:63)
at TypeEmitter.emitTypeReference (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_emitter.js:152:40)
at visitNode (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_emitter.js:116:38)
at Object.visitNode (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules\typescript\lib\typescript.js:83594:23)
at C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_emitter.js:133:52
at transformation (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules\typescript\lib\typescript.js:102910:24)
at Object.transformNodes (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules\typescript\lib\typescript.js:102921:78)
at Object.transform (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules\typescript\lib\typescript.js:155552:25)
at TypeEmitter.emitType (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_emitter.js:135:23)
at C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_parameter_emitter.js:62:79
at Array.map ()
at TypeParameterEmitter.emit (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\type_parameter_emitter.js:61:40)
at TypeCheckFile.Environment.emitTypeParameters (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\environment.js:141:28)
at TypeCheckFile.Environment.typeCtorFor (C:\Users\mafun\Documents\GitHub\medicalrcs\mrcs-workspace\node_modules@angular\compiler-cli\src\ngtsc\typecheck\src\environment.js:92:39)

I have tried to use issue #253 as a reference point, however, l am still unable to incorporate the table within my nx project and still get the exact same error.
Below is my package.json contents:
"dependencies": {
"@angular-generic-table/column-settings": "^5.0.0-alpha.3",
"@angular-generic-table/core": "^5.0.0-alpha.3",
"@angular/animations": "^12.2.0",
"@angular/cdk": "^12.0.0",
"@angular/common": "^12.2.0",
"@angular/compiler": "^12.2.0",
"@angular/core": "^12.2.0",
"@angular/fire": "^7.1.1",
"@angular/forms": "^12.2.0",
"@angular/platform-browser": "^12.2.0",
"@angular/platform-browser-dynamic": "^12.2.0",
"@angular/router": "^12.2.0",
"@nebular/auth": "^8.0.0",
"@nebular/eva-icons": "8.0.0",
"@nebular/security": "^8.0.0",
"@nebular/theme": "^8.0.0",
"@ng-bootstrap/ng-bootstrap": "^10.0.0",
"@nrwl/angular": "13.1.2",
"angular2-toaster": "^11.0.1",
"bootstrap": "^5.1.3",
"dragula": "^3.7.3",
"eva-icons": "^1.1.2",
"file-saver": "^2.0.5",
"firebase": "^9.3.0",
"ng2-dragula": "^2.1.1",
"papaparse": "^5.3.1",
"rxjs": "~6.6.0",
"tether": "^2.0.0",
"tslib": "^2.0.0",
"xlsx": "^0.17.3",
"zone.js": "~0.11.4"
}.

Assistance with how to overcome the above-error would be greatly appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions