尝试在 iphone 上构建 React Native 应用程序时出现 'npm start' 错误?
Getting 'npm start' error when trying to build React Native app on iphone?
当我对我的 iphone 6 进行构建时,我的设备上出现以下错误并出现红色屏幕:
"Could not connect to development server. Ensure node server is running - run 'npm start' from React root
The operation couldn't be completed.
(NSURLErrorDomain error - 1004)"
我在 React Packager 的终端中收到以下错误:
"Unhandled rejection Error: ENOENT, open '/Users/rahulsharma/Desktop/rcapp/.git/index.lock'"
最后,我在 xcode 控制台中得到了这个:
2015-05-06 12:37:48.631 rcapp[808:262187] CLTilesManagerClient: XPC_ERROR_CONNECTION_INVALID!
有什么想法吗?
这里是git中的代码:
查看 AppDelegate.m 并进行相应更新。
// To run on device, change `localhost` to the IP address of your computer, and make sure your computer and
// iOS device are on the same Wi-Fi network.
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
当我对我的 iphone 6 进行构建时,我的设备上出现以下错误并出现红色屏幕:
"Could not connect to development server. Ensure node server is running - run 'npm start' from React root
The operation couldn't be completed.
(NSURLErrorDomain error - 1004)"
我在 React Packager 的终端中收到以下错误:
"Unhandled rejection Error: ENOENT, open '/Users/rahulsharma/Desktop/rcapp/.git/index.lock'"
最后,我在 xcode 控制台中得到了这个:
2015-05-06 12:37:48.631 rcapp[808:262187] CLTilesManagerClient: XPC_ERROR_CONNECTION_INVALID!
有什么想法吗?
这里是git中的代码:
查看 AppDelegate.m 并进行相应更新。
// To run on device, change `localhost` to the IP address of your computer, and make sure your computer and
// iOS device are on the same Wi-Fi network.
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];