The master branch doesn't build anymore because the project doesn't ship a lock file and allows for newer typescript versions which break the code:
$ yarn build
yarn run v1.22.10
$ bob build
ℹ Building target commonjs
ℹ Cleaning up previous build at lib/commonjs
ℹ Compiling 42 files in src with babel
✓ Wrote files to lib/commonjs
ℹ Building target module
ℹ Cleaning up previous build at lib/module
ℹ Compiling 42 files in src with babel
✓ Wrote files to lib/module
ℹ Building target typescript
ℹ Cleaning up previous build at lib/typescript
ℹ Generating type definitions with tsc
src/presets.ts:14:7 - error TS4023: Exported variable 'Presets' has or is using name 'AnimatedNode' from external module "react-native-reanimated" but cannot be named.
14 const Presets = {
~~~~~~~
src/presets.ts:14:7 - error TS4023: Exported variable 'Presets' has or is using name 'AnimatedValue' from external module "react-native-reanimated" but cannot be named.
14 const Presets = {
~~~~~~~
src/presets/bubble/BubbleTabBar.tsx:105:7 - error TS4023: Exported variable 'BubbleTabBar' has or is using name 'AnimatedNode' from external module "react-native-reanimated" but cannot be named.
105 const BubbleTabBar = memo(BubbleTabBarComponent, isEqual);
~~~~~~~~~~~~
src/presets/bubble/BubbleTabBar.tsx:105:7 - error TS4023: Exported variable 'BubbleTabBar' has or is using name 'AnimatedValue' from external module "react-native-reanimated" but cannot be named.
105 const BubbleTabBar = memo(BubbleTabBarComponent, isEqual);
~~~~~~~~~~~~
src/presets/flashy/FlashyTabBar.tsx:110:7 - error TS4023: Exported variable 'FlashyTabBar' has or is using name 'AnimatedNode' from external module "react-native-reanimated" but cannot be named.
110 const FlashyTabBar = memo(FlashyTabBarComponent, (prevProps, nextProps) =>
~~~~~~~~~~~~
src/presets/flashy/FlashyTabBar.tsx:110:7 - error TS4023: Exported variable 'FlashyTabBar' has or is using name 'AnimatedValue' from external module "react-native-reanimated" but cannot be named.
110 const FlashyTabBar = memo(FlashyTabBarComponent, (prevProps, nextProps) =>
~~~~~~~~~~~~
src/presets/material/MaterialTabBar.tsx:165:7 - error TS4023: Exported variable 'MaterialTabBar' has or is using name 'AnimatedNode' from external module "react-native-reanimated" but cannot be named.
165 const MaterialTabBar = memo(MaterialTabBarComponent, isEqual);
~~~~~~~~~~~~~~
src/presets/material/MaterialTabBar.tsx:165:7 - error TS4023: Exported variable 'MaterialTabBar' has or is using name 'AnimatedValue' from external module "react-native-reanimated" but cannot be named.
165 const MaterialTabBar = memo(MaterialTabBarComponent, isEqual);
~~~~~~~~~~~~~~
Found 8 errors.
✖ Failed to build definition files.
bob build
build files for publishing
Options:
--help Show help [boolean]
--version Show version number [boolean]
Error: Failed to build definition files.
at build (/home/niko/devel/react-native-animated-tabbar/node_modules/@react-native-community/bob/lib/targets/typescript.js:112:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.handler (/home/niko/devel/react-native-animated-tabbar/node_modules/@react-native-community/bob/lib/cli.js:350:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The master branch doesn't build anymore because the project doesn't ship a lock file and allows for newer typescript versions which break the code:
I've limited typescript to
~4.0.8
, added ayarn.lock
file, linted and cherry-picked a commit from another PR (https://github.com/gorhom/react-native-animated-tabbar/pull/111) in order to fix a long standing issue with react-native-redash.