-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
@nrwl/react-native run-ios
failed on second run. Newly generated app
#15620
Comments
Tried the flag But if I switch dir between workspace root dir and app dir to run the command it works. |
Figured out the root cause. The error was thrown from this function Nx script seems that only load |
@Singloo I've been dealing with a similar incremental build error for a week or so now, and I'm observing the same thing with that directory. I don't see the connection between that and your last comment:
|
@curthipster RN codegen is using Try to edit |
@Singloo what did you change in I am seeing the artifacts in |
@curthipster Add some comments or space to |
@Singloo Thank you. So the key is that that file needs to be touched, and I accomplished the same with Do you understand why this gets |
@Singloo For now, I edited my mobile "patch-ios-incremental-build": {
"executor": "nx:run-commands",
"options": {
"command": "touch apps/mobile/ios/.xcode.env"
}
},
"run-ios": {
"dependsOn": ["patch-ios-incremental-build"],
"executor": "@nrwl/react-native:run-ios",
"options": {
"scheme": "Dev (Jam)"
}
}, |
@curthipster Some of those node version management tools don't have # This `.xcode.env` file is versioned and is used to source the environment
# used when running script phases inside Xcode.
# To customize your local environment, you can create an `.xcode.env.local`
# file that is not versioned.
# NODE_BINARY variable contains the PATH to the node executable.
#
# Customize the NODE_BINARY variable here.
# For example, to use nvm with brew, add the following line
# . "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
export ENTRY_FILE="${PROJECT_DIR}/../src/main.tsx"
|
i tried locally. i think i might know why. currently run-ios is trying to do pod install every time, by running the command with --install=false seems to work for the 2nd run. i would push up a proper fix. for now, change the run-ios target in project.json:
|
fixed in pr #15704 |
i figure out another workaround.
this should clear the ios cache and rebuild. |
Not sure this is really closed. Setting the
|
I got the following errors.
The above solution of adding patch-ios-incremental-build to touch |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
npx nx run-ios mobile
failed on the second runExpected Behavior
Should work properly
GitHub Repo
https://github.com/Singloo/nx-react-native-test
Steps to Reproduce
npx create-nx-workspace test-rn
--preset=react-native
--appName=mobile
npx nx run-ios mobile
npx nx run-ios mobile
Nx Report
Failure Logs
get full logs
Additional Information
react-native info
The text was updated successfully, but these errors were encountered: