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

Unable to Use angular material table. #13

Closed
vishwas097 opened this issue Jun 8, 2020 · 5 comments
Closed

Unable to Use angular material table. #13

vishwas097 opened this issue Jun 8, 2020 · 5 comments

Comments

@vishwas097
Copy link

No description provided.

@vishwas097
Copy link
Author

ERROR in node_modules/@angular/cdk/coercion/array.d.ts(10,60): error TS1005: ',' expected.
node_modules/@angular/cdk/coercion/array.d.ts(10,61): error TS1005: ',' expected.
node_modules/@angular/cdk/coercion/array.d.ts(10,75): error TS1144: '{' or ';' expected.
node_modules/@angular/cdk/coercion/array.d.ts(10,77): error TS1011: An element access expression should take an argument.

i 「wdm」: Failed to compile.

ERROR in node_modules/@angular/cdk/a11y/focus-trap/configurable-focus-trap.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/configurable-focus-trap.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(32,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(33,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(140,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(141,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(146,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/focus-trap/focus-trap.d.ts(147,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/key-manager/list-key-manager.d.ts(96,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/key-manager/list-key-manager.d.ts(98,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/live-announcer/live-announcer.d.ts(69,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/a11y/live-announcer/live-announcer.d.ts(70,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/bidi/dir.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/bidi/dir.d.ts(27,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/bidi/dir.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/coercion/array.d.ts(10,51): error TS2304: Cannot find name 'readonly'.
node_modules/@angular/cdk/coercion/array.d.ts(10,66): error TS2304: Cannot find name 'readonly'.
node_modules/@angular/cdk/coercion/array.d.ts(10,75): error TS2304: Cannot find name 'T'.
node_modules/@angular/cdk/collections/selection-model.d.ts(24,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(62,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(66,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/observers/observe-content.d.ts(67,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/cell.d.ts(50,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/cell.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/cell.d.ts(58,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/cell.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/table.d.ts(196,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/table.d.ts(197,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/table.d.ts(219,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/table.d.ts(220,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/table.d.ts(228,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/table.d.ts(229,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/text-column.d.ts(25,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/cdk/table/text-column.d.ts(26,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/datetime/date-adapter.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/option/option.d.ts(51,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/option/option.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/option/option.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/option/option.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/option/option.d.ts(62,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/option/option.d.ts(74,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/option/option.d.ts(79,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/ripple/ripple.d.ts(61,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/ripple/ripple.d.ts(62,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/ripple/ripple.d.ts(68,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/ripple/ripple.d.ts(69,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/ripple/ripple.d.ts(86,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/core/ripple/ripple.d.ts(91,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(64,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(67,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(68,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(71,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(72,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(75,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(76,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(79,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/paginator/paginator.d.ts(80,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/sort/sort-header.d.ts(88,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/sort/sort-header.d.ts(89,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/sort/sort.d.ts(47,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/sort/sort.d.ts(48,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/sort/sort.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/sort/sort.d.ts(55,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(47,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(48,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(53,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(54,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(59,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(60,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(72,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@angular/material/table/table-data-source.d.ts(73,9): error TS1086: An accessor cannot be declared in an ambient context.

getting these errors while importing MatTableModule to app.module.ts

@rarestoma
Copy link
Contributor

Hi @vishwas097,

Thank you for working with our products.

Can you please describe me all the steps that you made so I can test it?

Thank you,
Rares

@vishwas097
Copy link
Author

@rarestoma
1 - Cloned the project
2 - Installed angular cli - npm install -g @angular/cli
3 - npm install
4 - Got node-sass error on npm start
5 - npm i node-sass then npm start worked well
6 - ng add @angular/material -> Installing angular material through npm looks fine.
7 - When I was trying to import any module to my app.module.ts file or any other module.ts file
i am getting those errors.
For ex if i tried to import [ import {MatCardModule} from '@angular/material/card'; ]
in module.ts file i am getting error on npm start.
Hope you got it.
Let me know if any workaround available for this issue.
Thankyou

@rarestoma
Copy link
Contributor

Hi @vishwas097,

I tried all the steps that you provided and is working fine. After that, did you try importing the angular components somewhere? Maybe there are errors.

Thank you,
Rares

@vishwas097
Copy link
Author

@rarestoma Thanks for the response. No, I have only done those steps which I mentioned above. Do we need to import an angular component somewhere? Or is it because of version of angular material or cli?

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

2 participants