Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

data-table\component.ts is missing from the TypeScript compilation #1959

Closed
trimox opened this issue Aug 26, 2019 · 6 comments · Fixed by #2005
Closed

data-table\component.ts is missing from the TypeScript compilation #1959

trimox opened this issue Aug 26, 2019 · 6 comments · Fixed by #2005
Milestone

Comments

@trimox
Copy link
Owner

trimox commented Aug 26, 2019

If you encounter this error it's an upstream issue, and will be resolved in next MDC release.
material-components/material-components-web#4987

Workaround

Remove *.ts files from folder node_modules\@material\data-table

@trimox trimox added the bug label Aug 26, 2019
trimox pushed a commit that referenced this issue Aug 30, 2019
@TryHardDood Thank you once again! Great contribution

* Run tests, build library and documentation automatically when pushed to master.
* Deploy documentation to gh-pages branch when pushed to master.
* Run just the tests when a pull requests is created.

* Run tests, build library and documentation automatically when pushed to master.
* Deploy documentation to gh-pages branch when pushed to master.
* Run just the tests when a pull requests is created.

**Other changes:**
* Switched to node 11. (Because gulp fails when the library is built with node 12)
* Added quick workaround until #1959 is fixed.

closes #1965
@trimox trimox pinned this issue Aug 31, 2019
@trimox trimox changed the title v3.1.1 and data-table\component.ts is missing from the TypeScript compilation v3.1.x and data-table\component.ts is missing from the TypeScript compilation Aug 31, 2019
@Bitmanity
Copy link

Can you please elaborate the workaround
*Remove .ts files from folder node_modules@material\data-table

@trimox
Copy link
Owner Author

trimox commented Aug 31, 2019

Sure. Long and short, the material-components-web team accidentally published the Typescript *.ts files with the data-table component. Applications should use the already transpiled *.js.

Until the material teams next release, a quick workaround for downstream applications is removing the erroneous *.ts files from @material/data-table.

cd <path>/<app-name>/node_modules/@material/data-table

# List files (filter by *.ts)
ls *.ts -n

-rwxrwxrwx 1 0 0 5454 Aug 18 11:58 adapter.d.ts
-rwxrwxrwx 1 0 0 5261 Aug 18 11:58 adapter.ts
-rwxrwxrwx 1 0 0 2427 Aug 18 11:58 component.d.ts
-rwxrwxrwx 1 0 0 7406 Aug 18 11:58 component.ts
-rwxrwxrwx 1 0 0 1725 Aug 18 11:58 constants.d.ts
-rwxrwxrwx 1 0 0 2034 Aug 18 11:58 constants.ts
-rwxrwxrwx 1 0 0 2742 Aug 18 11:58 foundation.d.ts
-rwxrwxrwx 1 0 0 6604 Aug 18 11:58 foundation.ts
-rwxrwxrwx 1 0 0 1265 Aug 18 11:58 index.d.ts
-rwxrwxrwx 1 0 0 1266 Aug 18 11:58 index.ts
-rwxrwxrwx 1 0 0 1260 Aug 18 11:58 types.d.ts
-rwxrwxrwx 1 0 0 1255 Aug 18 11:58 types.ts

# remove *.ts from @material/data-table (with prompt for each)
rm -i *.ts

Hope this helps
-trimox

@trimox trimox changed the title v3.1.x and data-table\component.ts is missing from the TypeScript compilation data-table\component.ts is missing from the TypeScript compilation Sep 8, 2019
@madhavan-sundararaj
Copy link

This is a major issue for ivy compilation in Angular 8, hope the team releases the new version soon.

@trimox
Copy link
Owner Author

trimox commented Sep 13, 2019

How's this for timing, upstream update is out. 😄

https://github.com/material-components/material-components-web/blob/master/CHANGELOG.md#320-2019-09-12

I'll incorporate changes and release soon.

@madhavan-sundararaj
Copy link

That's great, can you look into #1912 (comment) also?

@trimox
Copy link
Owner Author

trimox commented Sep 16, 2019

@maddy2894 Thanks for reporting on Ivy. Be sure to watch issue #1982, Angular Ivy support is coming.

@trimox trimox unpinned this issue Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants