0
votes

I am the beginner to the react-native and I got an error while running the AwesomeProject in Android studio. I try running npm start and got the error. Below is the log file. Thank you!


0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
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: C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\vince\AwesomeProject\node_modules.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files\Java\jdk1.8.0_231\bin;C:\Users\vince\AppData\Local\Microsoft\WindowsApps;C:\Users\vince\AppData\Roaming\npm;C:\Users\vince\AppData\Local\Android\Sdk\platform-tools; 9 verbose lifecycle [email protected]~start: CWD: C:\Users\vince\AwesomeProject
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'react-native start' ]
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
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:210:5)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:210:5)
13 verbose stack at maybeClose (internal/child_process.js:1028:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\vince\AwesomeProject
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" 18 verbose node v13.1.0
19 verbose npm v6.12.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: react-native start
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 ]

3

3 Answers

1
votes
Fixed it.

watchman installation is required:

https://facebook.github.io/watchman/docs/install.html
0
votes

Did you installed watchman?

Install it from the below link:

https://facebook.github.io/watchman/docs/install.html

0
votes

I couldn't start react native project.

npm install -g expo-cli
expo init AwesomeProject
cd AwesomeProject
npm start

gives error. Error log is below.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Taner\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'android' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preandroid', 'android', 'postandroid' ]
5 info lifecycle @~preandroid: @
6 info lifecycle @~android: @
7 verbose lifecycle @~android: unsafe-perm in lifecycle true
8 verbose lifecycle @~android: PATH: C:\Users\Taner\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Taner\Desktop\RoboDezApp\node_modules\.bin;C:\Windows\System32;C:\Users\Taner\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\Taner\AppData\Local\Programs\Python\Python38\;C:\Program Files\eProsima\fastrtps 2.0.0\bin;C:\Program Files\eProsima\fastrtps 2.0.0\bin\x64Win64VS2017;C:\ProgramData\chocolatey\bin;C:\OpenSSL-Win64\bin\;C:\opencv\x64\vc16\bin;C:\Program Files\CMake\bin;C:\Users\Taner\AppData\Local\Programs\Python\Python38;C:\Python38;C:\Users\Taner\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Users\Taner\AppData\Local\Microsoft\WindowsApps;D:\CLion\CLion 2020.1.1\bin;;C:\mingw-w64\mingw32\bin;C:\Users\Taner\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Taner\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Windows\System32;C:\Users\Taner\AppData\Roaming\npm
9 verbose lifecycle @~android: CWD: C:\Users\Taner\Desktop\RoboDezApp
10 silly lifecycle @~android: Args: [ '/d /s /c', 'expo start --android' ]
11 silly lifecycle @~android: Returned: code: 1  signal: null
12 info lifecycle @~android: Failed to exec android script
13 verbose stack Error: @ android: `expo start --android`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\Taner\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\Taner\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd C:\Users\Taner\Desktop\RoboDezApp
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Taner\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "android"
18 verbose node v10.22.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error @ android: `expo start --android`
22 error Exit status 1
23 error Failed at the @ android script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]