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

fix mobile deployment #2986

Merged
merged 1 commit into from
Feb 18, 2022
Merged

fix mobile deployment #2986

merged 1 commit into from
Feb 18, 2022

Conversation

Kevan-Y
Copy link
Contributor

@Kevan-Y Kevan-Y commented Feb 18, 2022

Issue This PR Addresses

Fixes: #2732

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

Added missing dependency for mobile deployment.
Enable cache for Expo to reduce the time of downloading Expo. see

At the same time fixing dependencies version issue based on expo doctor command. see
image

Removed metro.config.js since dependencies require('@rnx-kit/metro-resolver-symlinks'); and require('@rnx-kit/metro-config'); causing issue during deployment. And also those wasn't require for our app to run.

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@gitpod-io
Copy link

gitpod-io bot commented Feb 18, 2022

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[19:46:26] Building optimized bundles and generating sourcemaps...
[19:46:28] Starting Metro Bundler
[19:46:39] Unrecognized event: {"type":"transformer_load_started"}
[19:46:39] Unrecognized event: {"type":"transformer_load_done"}
[19:46:39] Started Metro Bundler
[19:46:39] Cannot delete property 'resolveRequest' of #<Object>
[19:46:39] TypeError: Cannot delete property 'resolveRequest' of #<Object>
    at /home/runner/work/telescope/telescope/src/mobile/node_modules/@rnx-kit/metro-resolver-symlinks/lib/index.js:[13](https://github.com/Seneca-CDOT/telescope/runs/5252776336?check_suite_focus=true#step:7:13):9
    at Object.resolve (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro-resolver/src/resolve.js:31:12)
    at ModuleResolver.resolveDependency (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:115:31)
    at DependencyGraph.resolveDependency (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/node-haste/DependencyGraph.js:231:43)
    at Object.resolve (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/lib/transformHelpers.js:129:24)
    at resolve (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:33)
    at /home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:412:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:411:33)
    at processModule (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:[14](https://github.com/Seneca-CDOT/telescope/runs/5252776336?check_suite_focus=true#step:7:14)0:31)
Error: Process completed with exit code 1.

What's up with that?

@Kevan-Y
Copy link
Contributor Author

Kevan-Y commented Feb 18, 2022

[19:46:26] Building optimized bundles and generating sourcemaps...
[19:46:28] Starting Metro Bundler
[19:46:39] Unrecognized event: {"type":"transformer_load_started"}
[19:46:39] Unrecognized event: {"type":"transformer_load_done"}
[19:46:39] Started Metro Bundler
[19:46:39] Cannot delete property 'resolveRequest' of #<Object>
[19:46:39] TypeError: Cannot delete property 'resolveRequest' of #<Object>
    at /home/runner/work/telescope/telescope/src/mobile/node_modules/@rnx-kit/metro-resolver-symlinks/lib/index.js:[13](https://github.com/Seneca-CDOT/telescope/runs/5252776336?check_suite_focus=true#step:7:13):9
    at Object.resolve (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro-resolver/src/resolve.js:31:12)
    at ModuleResolver.resolveDependency (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:115:31)
    at DependencyGraph.resolveDependency (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/node-haste/DependencyGraph.js:231:43)
    at Object.resolve (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/lib/transformHelpers.js:129:24)
    at resolve (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:33)
    at /home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:412:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:411:33)
    at processModule (/home/runner/work/telescope/telescope/src/mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:[14](https://github.com/Seneca-CDOT/telescope/runs/5252776336?check_suite_focus=true#step:7:14)0:31)
Error: Process completed with exit code 1.

What's up with that?

I think this is because of this require('@rnx-kit/metro-resolver-symlinks'); and require('@rnx-kit/metro-config'); that causing some issue.
I had no idea why we need this. Expo app can works without this

* Fixes dependencies version issue

* Remove metro.config.js
@Kevan-Y Kevan-Y merged commit b2d1e16 into master Feb 18, 2022
@Kevan-Y Kevan-Y deleted the fix-mobile-deployment branch February 18, 2022 21:28
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.

Research how to ship React Native App to Android and iOS devices
4 participants