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

Failed to create the native project - Delete the ios and or android folders... I have none to begin with? #6482

Closed
technologyconsulting opened this issue Feb 12, 2024 · 3 comments

Comments

@technologyconsulting
Copy link

technologyconsulting commented Feb 12, 2024

How frequently does the bug occur?

Always

Description

Trying to follow the guide: https://www.mongodb.com/docs/realm/sdk/react-native/bootstrap-with-expo/

However, when I get to the 'expo run:android' part I get

Failed to create the native project
You may want to delete the ./ios and/or ./android directories before trying again.

But, I have no ios or android folder to begin with?

Stacktrace & log output

Mon Feb 12~ExpoRealm (master)>npx expo run:android

> exporealm@1.0.0 android
> expo run:android

env: load .env.local
env: export REACT_NATIVE_PACKAGER_HOSTNAME
(node:42476) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
env: load .env.local
env: export REACT_NATIVE_PACKAGER_HOSTNAME
spawn cmd.exe ENOENT
✖ Failed to create the native project.
You may want to delete the `./ios` and/or `./android` directories before trying again.

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

Expo 49.0.8

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Windows 11

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

@kneth
Copy link
Member

kneth commented Feb 14, 2024

On` MacOS, the template app works fine, and we are currently trying to reproduce it on Windows.

@technologyconsulting
Copy link
Author

Hey Kenneth,

I knew I forgot to update something :-) I figured out the issue (workaround).

I needed to run the following: npm install expo@latest && npx expo install --fix

Firing up a fresh install of expo and running a standard expo template worked ok. When trying the realm template from the documentation didn't work and showed an outdated expo-cli version? Running the command above has solved this but there was no mention in the docs.

@kneth
Copy link
Member

kneth commented Feb 14, 2024

@technologyconsulting

Thank you for the update.

showed an outdated expo-cli version

Yes, the documentation team is aware, and we will update soon. Your work-around might also be good to include in the documentation.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants