tabs
tabs copied to clipboard
Module not found: Error: Can't resolve 'rc-util/es/isMobile' in node_modules/rc-tabs/es
After pulling in version 11.7.1 I get the error below. Switching back to 11.7.0 fixes it. So, somehow this must be a regression.
ERROR in ./smc-webapp/node_modules/rc-tabs/es/Tabs.js
Module not found: Error: Can't resolve 'rc-util/es/isMobile' in '[...]/smc-webapp/node_modules/rc-tabs/es'
@ ./smc-webapp/node_modules/rc-tabs/es/Tabs.js 11:0-43 108:14-22
@ ./smc-webapp/node_modules/rc-tabs/es/index.js
@ ./smc-webapp/node_modules/antd/es/tabs/index.js
@ ./smc-webapp/node_modules/antd/es/index.js
[...]
[isMobile] was added by @zombieJ in 5.5.0 (https://github.com/react-component/util/commit/bac008eaf319a13f83f266ed87d334c7d5535572#diff-fcdbcc9da96b9b7d77e20a00504aff80fc5105eb2abfa9b8458a7546e7b51ec8), which rc-tabs depends on, but it seems like the file is actually missing in that version.
I fixed this (in yarn) by adding "resolutions": { "rc-util": "^5.8.1" } and running yarn to force the latest version to be pulled. You can then remove the resolution once it's in your lockfile.
ERROR in ./node_modules/rc-util/es/hooks/useId.js 23:9-20 export 'useId' (imported as 'React') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version) @ ./node_modules/rc-dialog/es/Dialog/index.js 8:0-43 54:15-20 @ ./node_modules/rc-dialog/es/DialogWrap.js 5:0-30 35:44-50 53:44-50 @ ./node_modules/rc-dialog/es/index.js 1:0-38 2:15-25 @ ./node_modules/antd/es/modal/Modal.js 18:0-31 102:42-48 @ ./node_modules/antd/es/modal/index.js 1:0-34 10:12-23 @ ./node_modules/antd/es/index.js 35:0-43 35:0-43 @ ./src/App.js 28:0-28 @ ./src/index.js 7:0-24 17:35-38