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: optional expo router import #190

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

matinzd
Copy link
Collaborator

@matinzd matinzd commented May 1, 2024

importing preview from react-native-ide will result in error if expo-router is not installed.

2024-05-02 00:10:04.776 [error] Unable to resolve module expo-router/entry from /Users/matin.zadeh.dolatabad@schibsted.com/.vscode/extensions/swmansion.react-native-ide-0.0.9-beta/lib/preview.js: expo-router/entry could not be found within the project or in these directories:
  ../../node_modules
  node_modules
  ../../node_modules
> 1 | require("expo-router/entry");
    |          ^
  2 | const { AppRegistry, View } = require("react-native");
  3 |
  4 | global.__RNIDE_previews ||= new Map();
2024-05-02 00:10:04.781 [error] [Error: undefined Unable to resolve module expo-router/entry from /Users/matin.zadeh.dolatabad@schibsted.com/.vscode/extensions/swmansion.react-native-ide-0.0.9-beta/lib/preview.js: expo-router/entry could not be found within the project or in these directories:
  ../../node_modules
  node_modules
  ../../node_modules
> 1 | require("expo-router/entry");
    |          ^
  2 | const { AppRegistry, View } = require("react-native");
  3 |
  4 | global.__RNIDE_previews ||= new Map();]

Before:

image

After:

Screenshot 2024-05-02 at 00 14 12

Copy link

vercel bot commented May 1, 2024

@matinzd is attempting to deploy a commit to the software-mansion Team on Vercel.

To accomplish this, @matinzd needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

@matinzd
Copy link
Collaborator Author

matinzd commented May 1, 2024

Not sure if requiring expo router is needed tho.
If not, it's better to remove it.

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

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

Thanks, it isn't actually needed anymore, and was just left over after some refactoring we did in the past, I'll remove it in a follow-up

@kmagiera kmagiera merged commit 5c97e05 into software-mansion:main May 6, 2024
1 check failed
@kmagiera kmagiera deleted the patch-1 branch May 6, 2024 11:23
kmagiera added a commit that referenced this pull request May 6, 2024
As spotted in #190 using preview functionality required you to have expo
router installed.

This was due to an import in lib file that gets loaded when you use the
preview package. The import was a legacy code that was put there when we
used a different way of loading preview package. Now that it is no
longer needed it can be safely removed.
Copy link

vercel bot commented Jun 5, 2024

An owner of the software-mansion Team on Vercel declined @matinzd's request to join.

In order for their commit to be deployed, @matinzd must push and request access again.

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.

2 participants