vitali1995
@vitali1995

Как установить React Native?

Mac Sierra. Пытаюсь установить по инструкции с официального сайта, постоянно лезут ошибки прав доступа (в папке с документами). Одну из них - ".babel.json" - исправил как здесь, но это ненормальная ситуация, не могу понять причину.
P.S.: xcode и android studio установлены, javac 1.8.0_91

react-native run-ios
Found Xcode project AwesomeProject.xcodeproj
We couldn't boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time.
Launching iPhone 6 (iOS 10.2)...
Building using "xcodebuild -project AwesomeProject.xcodeproj -configuration Debug -scheme AwesomeProject -destination id=CC1165B0-590A-4DB1-AD94-0E6D5B363C39 -derivedDataPath build"
User defaults from command line:

    IDEDerivedDataPathOverride = /Users/MacBook/Documents/rn-test/AwesomeProject/ios/build


2017-01-31 22:01:35.905 xcodebuild[2511:163918] couldn't read dependency graph from '/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/yoga.build/dgph': Permission denied

2017-01-31 22:01:35.906 xcodebuild[2511:163918] unable to create temporary file at /Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/yoga.build/dgph-1oULRp4M: Permission denied
2017-01-31 22:01:35.909 xcodebuild[2511:163918]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-11758/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/DependencyGraph/XCDependencyGraph.mm:688
Details:  unable to write dependency graph: Permission denied
Object:   <XCDependencyGraph>
Method:   +loadOrCreateInBuildDirectory:withTargetBuildContext:withBasePath:
Thread:   <NSThread: 0x7f8e758289e0>{number = 10, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2017-01-31 22:01:35.910 xcodebuild[2511:163917] couldn't read dependency graph from '/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/jschelpers.build/dgph': Permission denied
2017-01-31 22:01:35.910 xcodebuild[2511:163917] unable to create temporary file at /Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/jschelpers.build/dgph-LY7o5Evu: Permission denied
2017-01-31 22:01:35.910 xcodebuild[2511:163917]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-11758/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/DependencyGraph/XCDependencyGraph.mm:688
Details:  unable to write dependency graph: Permission denied
Object:   <XCDependencyGraph>
Method:   +loadOrCreateInBuildDirectory:withTargetBuildContext:withBasePath:
Thread:   <NSThread: 0x7f8e7584db40>{number = 9, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

2017-01-31 22:01:35.916 xcodebuild[2511:163919] couldn't read dependency graph from '/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/cxxreact.build/dgph': Permission denied

2017-01-31 22:01:35.916 xcodebuild[2511:163919] unable to create temporary file at /Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/cxxreact.build/dgph-gloM7NCv: Permission denied

2017-01-31 22:01:35.916 xcodebuild[2511:163919]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-11758/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/BuildSystem/DependencyGraph/XCDependencyGraph.mm:688
Details:  unable to write dependency graph: Permission denied
Object:   <XCDependencyGraph>
Method:   +loadOrCreateInBuildDirectory:withTargetBuildContext:withBasePath:
Thread:   <NSThread: 0x7f8e7585c350>{number = 11, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

Build Preparation

Couldn't create workspace arena folder '/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build': Unable to write to info file '<DVTFilePath:0x7f8e757ba860:'/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/info.plist'>'.

Couldn't update module cache session file '/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/ModuleCache/Session.modulevalidation': You don’t have permission to save the file “Session.modulevalidation” in the folder “ModuleCache”.



** BUILD FAILED **

2017-01-31 22:01:36.101 xcodebuild[2511:163891] Error saving log: Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSFilePath=/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Logs/Build/3A1A2FC5-FD1F-42FB-901A-DBBB3D91DB5E.xcactivitylog, NSLocalizedDescription=No such file or directory} | User info: {
    NSFilePath = "/Users/MacBook/Documents/rn-test/AwesomeProject/ios/build/Logs/Build/3A1A2FC5-FD1F-42FB-901A-DBBB3D91DB5E.xcactivitylog";
    NSLocalizedDescription = "No such file or directory";
}

Installing build/Build/Products/Debug-iphonesimulator/AwesomeProject.app
Launching org.reactjs.native.example.AwesomeProject
org.reactjs.native.example.AwesomeProject: 2525
  • Вопрос задан
  • 840 просмотров
Пригласить эксперта
Ответы на вопрос 4
Antonoff
@Antonoff
Разработчик
Офф доки это лучшая инструкция. По факту - тоже мак за 5 секунд всё запустил без никаких проблем.

Ну и как бы очень логично было бы после фразу "лезут ошибки" - выложить их сюда и по факту уже смотреть что и как.
Ответ написан
GreyCrew
@GreyCrew
Full-stack developer
Попробуй create-react-app Думаю упростит работу
Ответ написан
mattedev
@mattedev
web developer
Никогда не было проблем с реакт нетив. Как вариант попробуй запустить с десктопа. Или создай проект с правами админа.
Ответ написан
Комментировать
blackPeanut
@blackPeanut
React Native / Front-end developer
У вас видно 2 бросающиеся в глаза ошибки:
1. Запущен уже один эмулятор (это не страшно)
2. Нет прав доступа для чтения/записи

Возможно в вашем аккаунте недостаточно прав доступа для запуска. Попробуйте как вариант запустить с sudo -
$sudo react-native run-ios

либо же через XCode
$open ios/ProjectName.xcodeproj
И запуститься: CMD⌘ + R


И не забудьте установить XCode command line tools :)
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы