gpt4 book ai didi

ios - pod install mkdir 权限被拒绝

转载 作者:行者123 更新时间:2023-12-04 07:46:57 25 4
gpt4 key购买 nike

当我运行 npx pod install 时,我有一个带有 RN 64.0 的新 React Native 项目它无法返回:

npx: installed 1 in 27.036s
Scanning for pods...
1.10.1
> pod install
Auto-linking React Native modules for target `MyMALnew`: RNCAsyncStorage, RNCMaskedView, RNGestureHandler, RNReanimated, RNScreens, and react-native-safe-area-context
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.64.0)
Installing FBReactNativeSpec (0.64.0)
[!] /bin/bash -c
set -e
mkdir -p /Volumes/Macintosh HD - Data/WORK/MyMALnew/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec && touch /Volumes/Macintosh HD - Data/WORK/MyMALnew/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h /Volumes/Macintosh HD - Data/WORK/MyMALnew/node_modules/react-native/scripts/../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm

mkdir: /Volumes/Macintosh: Permission denied

ps:这是我第一次在 RN 中使用 npx 前缀,不确定这是否是这里的问题:)
谢谢你的帮助..

最佳答案

这是因为您的卷名“Macintosh HD”由两个由空格分隔的单词组成。
这个生成的路径 -> mkdir -p/Volumes/Macintosh HD 应替换为 mkdir -p "/Volumes/Macintosh HD" (添加引号)我认为是 RN 团队的。
我遇到了同样的问题,将我的 Volume 重命名为单个单词并重新安装 node_modules 解决了这个问题。

关于ios - pod install mkdir 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67160700/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com