简体   繁体   English

不能使用react-native-svg。 Xcode无法打开PerformanceBezier和QuartzBookPack

[英]Can't use react-native-svg. Xcode can't open PerformanceBezier and QuartzBookPack

I'm new to React Native and Xcode. 我是React Native和Xcode的新手。

When I npm install react-native-svg I get the following: 当我npm install react-native-svg我得到以下内容:

Start downloading PerformanceBezier to /Users/username/AwesomeProject/node_modules/react-native-svg/ios/PerformanceBezier Download PerformanceBezier library from github failed with err: { Error: ENOTEMPTY: directory not empty, rename '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988242148-4207165471078973/PerformanceBezier-master' -> '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/PerformanceBezier' errno: -66, code: 'ENOTEMPTY', syscall: 'rename', path: '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988242148-4207165471078973/PerformanceBezier-master', dest: '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/PerformanceBezier' } Download PerformanceBezier library success! 开始将PerformanceBezier下载到/Users/username/AwesomeProject/node_modules/react-native-svg/ios/PerformanceBezier从github下载PerformanceBezier库失败,并显示err:{错误:ENOTEMPTY:目录不为空,重命名'/ Users / username / AwesomeProject / node_modules / react-native-svg / 1511988242148-4207165471078973 / PerformanceBezier-master'->'/ Users / username / AwesomeProject / node_modules / react-native-svg / ios / PerformanceBezier'errno:-66,代码:“ ENOTEMPTY”,系统调用: 'rename',路径:'/ Users / username / AwesomeProject / node_modules / react-native-svg / 1511988242148-4207165471078973 / PerformanceBezier-master',dest:'/ Users /用户名/ AwesomeProject / node_modules / react-native-svg / ios / PerformanceBezier'}下载PerformanceBezier库成功!

Start downloading QuartzBookPack to /Users/username/AwesomeProject/node_modules/react-native-svg/ios/QuartzBookPack Download QuartzBookPack library from github failed with err: { Error: ENOTEMPTY: directory not empty, rename '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988243034-9050633810649857/QuartzBookPack-master' -> '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/QuartzBookPack' errno: -66, code: 'ENOTEMPTY', syscall: 'rename', path: '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988243034-9050633810649857/QuartzBookPack-master', dest: '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/QuartzBookPack' } Download QuartzBookPack library success! 开始将QuartzBookPack下载到/Users/username/AwesomeProject/node_modules/react-native-svg/ios/QuartzBookPack从github下载QuartzBookPack库,失败并出现err:{错误:ENOTEMPTY:目录不为空,重命名为'/ Users / username / AwesomeProject / node_modules / react-native-svg / 1511988243034-9050633810649857 / QuartzBookPack-master'->'/ Users / username / AwesomeProject / node_modules / react-native-svg / ios / QuartzBookPack'errno:-66,代码:“ ENOTEMPTY”,系统调用: 'rename',路径:'/ Users / username / AwesomeProject / node_modules / react-native-svg / 1511988243034-9050633810649857 / QuartzBookPack-master',dest:'/ Users / username / AwesomeProject / node_modules / react-native-svg / ios / QuartzBookPack'}下载QuartzBookPack库成功! + react-native-svg@6.0.1-rc.0 + react-native-svg@6.0.1-rc.0

Clearly it's having a problem, but then it says that they're both successfully installed. 显然这是有问题的,但随后又说它们都已成功安装。 When I try to build the Xcode project I get an error saying that Xcode can't open either of their .xcodeproject files. 当我尝试构建Xcode项目时,出现一条错误消息,提示Xcode无法打开其任何一个.xcodeproject文件。

Is this something that's going wrong on my end, or is there an issue with the repos that these files are being pulled from? 这到底是我出了什么问题,还是从中提取这些文件的仓库有问题?

I have react-native-cli: 2.0.1 and react-native: 0.50.4. 我有react-native-cli:2.0.1和react-native:0.50.4。 and am trying to install react-native-svg@6.0.1-rc.0. 并试图安装react-native-svg@6.0.1-rc.0。

Looks like this has been reported here: https://github.com/react-native-community/react-native-svg/issues/530 看起来好像已经在这里报道过: https : //github.com/react-native-community/react-native-svg/issues/530

Workaround is to run the following: 解决方法是运行以下命令:

$ cd node_modules/react-native-svg/
$ rm -rf ios/PerformanceBezier/ ios/QuartzBookPack/
$ npm run postinstall

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM