gpt4 book ai didi

cordova - 在 Mac 上安装 Cordova 时出错

转载 作者:行者123 更新时间:2023-12-02 21:12:02 25 4
gpt4 key购买 nike

我尝试使用npm安装Cordova,但是花了一个多小时,然后我放弃了。后来我尝试按照http://cordova.apache.org/的指示进行操作,并且在执行npm install -g ios-deploy时发生错误。

这是我在命令行中得到的内容:

YangHenrydeMacBook-Pro:~ Yong$ sudo npm install -g ios-deploy npm WARN lifecycle ios-deploy@1.8.3~preinstall: cannot run in wd %s %s (wd=%s) ios-deploy@1.8.3 ./src/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-fbfd9f76b9a8909271fae167aab47715
npm ERR! Darwin 14.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-deploy"
npm ERR! node v5.1.1
npm ERR! npm v3.3.12
npm ERR! path /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Yong/npm-debug.log

有人能给我一些提示吗?谢谢!

最佳答案

为了完整起见,@Sam003 的答案是正确的,使用 --unsafe-perm=true 是在 MacOS 10.11 及更高版本下安装模块的按节点推荐方式。

从 nmp 安装:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! WARNING: You are on OS X 10.11 El Capitan or greater, you may need to add the
!!!! WARNING: `--unsafe-perm=true` flag when running `npm install`
!!!! WARNING: or else it will fail.
!!!! WARNING: link:
!!!! WARNING: https://github.com/phonegap/ios-deploy#os-x-1011-el-capitan
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

关于cordova - 在 Mac 上安装 Cordova 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34103775/

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