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

Remove symlink NativeReanimated.native.ts -> NativeReanimated.ts #3492

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Aug 18, 2022

Description

This symlink causes pod install / gradle sync (also Android build) to fail when using latest React Native Community CLI (shipped with React Native 0.70.0-rc.3) with following stack trace:

error ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'.

[!] Invalid `Podfile` file: 859: unexpected token at 'Error: ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'

  at Object.openSync (node:fs:599:3)

  at Object.readFileSync (node:fs:467:35)

  at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:64

  at Array.map (<anonymous>)

  at findComponentDescriptors (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:34)

  at Object.dependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/index.js:136:122)

  at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:47:61

  at Array.reduce (<anonymous>)

  at getDependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:44:51)

  at get react-native-reanimated [as react-native-reanimated] (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:99:18)

info Run CLI with --verbose flag for more details.
'.

#  from /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/ios/Podfile:11
#  -------------------------------------------
#  target 'FabricTestExample' do
>    config = use_native_modules!
#
#  -------------------------------------------

The reason for this symlink to exist is not clear to me, as when
NativeReanimated.native.ts file is not present NativeReanimated.ts
should be used by default instead (?).

Changes

Removed symlink src/reanimated2/__mocks__/NativeReanimated.native.ts pointing to NativeReanimated.ts in the same directory.

Test code and steps to reproduce

To reproduce the issue you can try to build project with react-native-reanimated & react-native-screens#b9beeca (this reference will be valid until the branch introducing support for React Native 0.70.0 is merged to main in react-native-screens repository.)

Checklist

  • Ensured that CI passes

@kkafar kkafar changed the base branch from main to Reanimated2 August 18, 2022 08:09
@kkafar kkafar marked this pull request as ready for review August 18, 2022 08:16
@kkafar kkafar requested a review from piaskowyk August 18, 2022 08:19
@kkafar kkafar changed the title fix: remove symlink NativeReanimated.native.ts -> NativeReanimated.ts Remove symlink NativeReanimated.native.ts -> NativeReanimated.ts Aug 18, 2022
@kkafar kkafar changed the base branch from Reanimated2 to main August 18, 2022 13:49
@kkafar kkafar changed the base branch from main to Reanimated2 August 18, 2022 13:53
This symlink causes `pod install` / `gradle sync` (also Android build)
  to fail when using latest React Native Community CLI (shipped with
      React Native 0.70.0-rc.3) with following stack trace:

  ```
  error ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'.

[!] Invalid `Podfile` file: 859: unexpected token at 'Error: ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'

    at Object.openSync (node:fs:599:3)

    at Object.readFileSync (node:fs:467:35)

    at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:64

    at Array.map (<anonymous>)

    at findComponentDescriptors (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:34)

    at Object.dependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/index.js:136:122)

    at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:47:61

    at Array.reduce (<anonymous>)

    at getDependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:44:51)

    at get react-native-reanimated [as react-native-reanimated] (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:99:18)

info Run CLI with --verbose flag for more details.
'.

 #  from /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/ios/Podfile:11
 #  -------------------------------------------
 #  target 'FabricTestExample' do
 >    config = use_native_modules!
 #
 #  -------------------------------------------
 ```

 The reason for this symlink to exist is not clear to me, as when
 NativeReanimated.native.ts file is not present NativeReanimated.ts
 should be used by default instead (?).
@kkafar kkafar changed the base branch from Reanimated2 to main August 23, 2022 07:55
@piaskowyk piaskowyk merged commit 24ed8ef into main Sep 1, 2022
@piaskowyk piaskowyk deleted the @kkafar/remove-symlink branch September 1, 2022 14:43
piaskowyk pushed a commit that referenced this pull request Oct 5, 2022
## Description

This symlink causes `pod install` / `gradle sync` (also Android build) to fail when using latest React Native Community CLI (shipped with *React Native 0.70.0-rc.3*) with following stack trace:

  ```
  error ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'.

[!] Invalid `Podfile` file: 859: unexpected token at 'Error: ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'

    at Object.openSync (node:fs:599:3)

    at Object.readFileSync (node:fs:467:35)

    at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:64

    at Array.map (<anonymous>)

    at findComponentDescriptors (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:34)

    at Object.dependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/index.js:136:122)

    at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:47:61

    at Array.reduce (<anonymous>)

    at getDependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:44:51)

    at get react-native-reanimated [as react-native-reanimated] (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:99:18)

info Run CLI with --verbose flag for more details.
'.

 #  from /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/ios/Podfile:11
 #  -------------------------------------------
 #  target 'FabricTestExample' do
 >    config = use_native_modules!
 #
 #  -------------------------------------------
 ```

The reason for this symlink to exist is not clear to me, as when
NativeReanimated.native.ts file is not present NativeReanimated.ts
should be used by default instead (?).

## Changes

Removed symlink `src/reanimated2/__mocks__/NativeReanimated.native.ts` pointing to  `NativeReanimated.ts` in the same directory.

## Test code and steps to reproduce

To reproduce the issue you can try to build project with `react-native-reanimated` & `react-native-screens#b9beeca` (this reference will be valid until the branch introducing support for React Native 0.70.0 is merged to `main` in `react-native-screens` repository.)

## Checklist

- [ ] Ensured that CI passes

Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this pull request Jun 5, 2023
…tware-mansion#3492)

## Description

This symlink causes `pod install` / `gradle sync` (also Android build) to fail when using latest React Native Community CLI (shipped with *React Native 0.70.0-rc.3*) with following stack trace:

  ```
  error ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'.

[!] Invalid `Podfile` file: 859: unexpected token at 'Error: ENOENT: no such file or directory, open '/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-reanimated/src/reanimated2/__mocks__/NativeReanimated.native.ts'

    at Object.openSync (node:fs:599:3)

    at Object.readFileSync (node:fs:467:35)

    at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:64

    at Array.map (<anonymous>)

    at findComponentDescriptors (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/findComponentDescriptors.js:49:34)

    at Object.dependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-platform-android/build/config/index.js:136:122)

    at /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:47:61

    at Array.reduce (<anonymous>)

    at getDependencyConfig (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:44:51)

    at get react-native-reanimated [as react-native-reanimated] (/Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/@react-native-community/cli-config/build/loadConfig.js:99:18)

info Run CLI with --verbose flag for more details.
'.

 #  from /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/ios/Podfile:11
 #  -------------------------------------------
 #  target 'FabricTestExample' do
 >    config = use_native_modules!
 #
 #  -------------------------------------------
 ```

The reason for this symlink to exist is not clear to me, as when
NativeReanimated.native.ts file is not present NativeReanimated.ts
should be used by default instead (?).

## Changes

Removed symlink `src/reanimated2/__mocks__/NativeReanimated.native.ts` pointing to  `NativeReanimated.ts` in the same directory.

## Test code and steps to reproduce

To reproduce the issue you can try to build project with `react-native-reanimated` & `react-native-screens#b9beeca` (this reference will be valid until the branch introducing support for React Native 0.70.0 is merged to `main` in `react-native-screens` repository.)

## Checklist

- [ ] Ensured that CI passes

Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
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

Successfully merging this pull request may close these issues.

None yet

3 participants