简体   繁体   中英

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

I'm new to React Native and Xcode.

When I npm install react-native-svg I get the following:

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!

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! + 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.

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. and am trying to install 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

Workaround is to run the following:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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