search-ui icon indicating copy to clipboard operation
search-ui copied to clipboard

Dependency on old rc-pagination causes Webpack build errors

Open kanadaj opened this issue 3 years ago • 6 comments

Due to having a dependency on rc-pagination 1.x (which uses babel-runtime explicitly), trying to use the search UI in webpack along with core-js 3 and @babel/runtime-corejs3 and @babel/plugin-transform-runtime (not sure this one is even needed for repro) causes a Module not found issue:

Module not found: Error: Can't resolve 'core-js/library/fn/symbol/iterator' in 'H:\Work\Project\node_modules\babel-runtime\core-js\symbol'
 @ ./node_modules/babel-runtime/helpers/typeof.js 5:16-53
 @ ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js 5:15-43
 @ ./node_modules/rc-pagination/es/Pagination.js 5:0-89 40:16-42
 @ ./node_modules/rc-pagination/es/index.js 1:0-39 1:0-39
 @ ./node_modules/@elastic/react-search-ui-views/es/Paging.js 6:0-41 18:42-54
 @ ./node_modules/@elastic/react-search-ui-views/es/index.js 6:0-45 6:0-45
 @ ./node_modules/@elastic/react-search-ui/es/containers/ErrorBoundary.js 21:0-63 43:25-38
 @ ./node_modules/@elastic/react-search-ui/es/containers/index.js 1:0-59 1:0-59
 @ ./node_modules/@elastic/react-search-ui/es/index.js 5:0-29 5:0-29

Adding an explicit reference to [email protected] seems to fix this. Maybe bump the package version?

kanadaj avatar Nov 26 '21 14:11 kanadaj

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.

botelastic[bot] avatar Jan 25 '22 15:01 botelastic[bot]

I can see rc-pagination is on the road map to be replaced https://github.com/elastic/search-ui/issues/308, but it has been quite long since the decision had been made and there's little progress.

I think we should at least keep the packages used up-to-date at some level before they are replaced.

zhuhaow avatar Mar 19 '22 04:03 zhuhaow

Good thought, we could simply update our dependencies in the meantime.

JasonStoltz avatar Mar 21 '22 15:03 JasonStoltz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.

botelastic[bot] avatar May 20 '22 16:05 botelastic[bot]

Hello, any update on this one?

ivanteso avatar Jun 28 '22 11:06 ivanteso

We're updating some dependencies now. I'll see if we can get this one on the list @yakhinvadim.

JasonStoltz avatar Jun 28 '22 17:06 JasonStoltz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.

botelastic[bot] avatar Sep 03 '22 22:09 botelastic[bot]