0
I am working on an application inside a new directory, but the emulator insists on calling another application from a folder that has already been deleted. Where is the problem?
I’m using the Xcode... I followed the whole procedure to make a new project:
I installed all the dependencies:
Xcode, Android Studio, Node, Watchman, jdk8, React-Native-cli, React-devtools, expo-cli, cocoapods...
I did the whole step-by-step:
react-native init meuProjetoNovo
npm install
npm install yarn
react-native start
cd meuProjetoNovo/ios/
pod install
cd ..
react-native run-ios
Configured installed the pods for IOS to assimilate the routes in the folder of: myProjetoNovo/Ios
What is not very clear in documentation of how to do.
I set up the directory structure, as documented.
And yet it’s as if the route is tied to an old application.
In the terminal everything appears ok:
Tree git:(master) React-Native run-Ios info Found Xcode Workspace "Tree.xcworkspace" info Building (using "xcodebuild -Workspace Tree.xcworkspace -Configuration Debug -Scheme Tree -Destination id=7399C5C4-4245-41CD-88B9-564ED1EDB3EE -derivedDataPath build/Tree building") ................................................................................................................................................................................................................................................................................................................................................................................................................................................... info Installing "build/Arvoreeducacao/Build/Products/Debug-iphonesimulator/Arvoreeducacao.app" info Launching "org.reactjs.Native.example.Trees" Successfully launched the app on the Simulator
It loads the normal screen until the end... and then appears a red screen breaking everything calling an application nothing to see old...
Edited so far - I did what was suggested:
npm start --reset-cache ou watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean --force && npm install && npm start -- --reset-cache
What happened:
Log:
> [email protected] start /Users/ivanferrer/projects/arvore_educacao/test-react-native/ArvoreEducacao
> react-native start "ou" "watchman" "watch-del-all"
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/ivanferrer/projects/arvore_educacao/test-react-native/ArvoreEducacao/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle [email protected]~start: CWD: /Users/ivanferrer/projects/arvore_educacao/test-react-native/ArvoreEducacao
10 silly lifecycle [email protected]~start: Args: [ '-c', 'react-native start "ou" "watchman" "watch-del-all"' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `react-native start "ou" "watchman" "watch-del-all"`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/ivanferrer/projects/arvore_educacao/test-react-native/ArvoreEducacao
16 verbose Darwin 18.5.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "--reset-cache" "ou" "watchman" "watch-del-all"
18 verbose node v8.11.4
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `react-native start "ou" "watchman" "watch-del-all"`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Continues like this:
You could try making one
npm start --reset-cache
orwatchman watch-del-all && 
rm -rf $TMPDIR/react-native-packager-cache-* &&
rm -rf $TMPDIR/metro-bundler-cache-* && 
rm -rf node_modules/ 
&& npm cache clean --force &&
npm install && 
npm start -- --reset-cache
. If you are using a simulator try to clear your cache too, go to your Xcode menu click on: Project -> Clean and build folder– Esdras Xavier
Here is English: Product > Clear Build Folder ?
– Ivan Ferrer
That’s right, I thought it was in Portuguese and translated from the original :p
– Esdras Xavier
About the new mistakes that have appeared, take a look in that Stack topic in English
– Esdras Xavier