5
respostas

Erro ao instalar ios-sim e ios-deploy

Estou tentando instalar os pacotes mas está dando este erro. O que fazer?

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-sim" "ios-deploy"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
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 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/gustavo/Google Drive/alura/cordova/garconapp/npm-debug.log
MacBook-Pro-de-Gustavo:garconapp gustavo$
5 respostas

Estou no OS 10.12.3. Eu vi que se instalar com

sudo npm -g --unsafe-perm=true install ios-sim ios-deploy

funciona. Ele instalou porém ao chamar o build está jogando esse erro 65:

** BUILD FAILED **


The following build commands failed:
    Libtool /Users/gustavoperenciolo/Google\ Drive/alura/cordova/garconapp/platforms/ios/build/emulator/libCordova.a normal x86_64
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/gustavoperenciolo/Google Drive/alura/cordova/garconapp/platforms/ios/cordova/build-debug.xcconfig,-workspace,Garçonete, Só de Cenoura.xcworkspace,-scheme,Garçonete, Só de Cenoura,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/gustavoperenciolo/Google Drive/alura/cordova/garconapp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/gustavoperenciolo/Google Drive/alura/cordova/garconapp/platforms/ios/build/sharedpch

Oi Gustavo, eu to no OSX 10.10 ainda por isso nao tenho esses erros. Andei pesquisando um pouco mais e parece que tem algo mesmo no 10.12:

https://github.com/phonegap/ios-deploy/issues/277

Na documentacao do ios-deploy ele fala do usafe-perm mas tbm de outros 2 passos:

https://github.com/phonegap/ios-deploy#os-x-1011-el-capitan-or-greater

Acho que vale a pena tentar...

Pessoal Estou com o mesmo problema, vocês podem me ajudar?

MacBook-Pro-de-Paulo-Peres:~ usuariobr$ sudo npm install -g ios-sim ios-deploy
Password:
Sorry, try again.
Password:
npm WARN lifecycle ios-deploy@1.9.1~preinstall: cannot run in wd %s %s (wd=%s) ios-deploy@1.9.1 ./src/scripts/check_reqs.js && xcodebuild /usr/local/lib/node_modules/.staging/ios-deploy-298c9491
/usr/local/lib
└─┬ ios-sim@5.0.13 
  ├── bplist-parser@0.0.6 
  ├─┬ nopt@1.0.9 
  │ └── abbrev@1.1.0 
  ├─┬ plist@1.2.0 
  │ ├── base64-js@0.0.8 
  │ ├── util-deprecate@1.0.2 
  │ ├─┬ xmlbuilder@4.0.0 
  │ │ └── lodash@3.10.1 
  │ └── xmldom@0.1.27 
  └─┬ simctl@0.1.0 
    ├── shelljs@0.2.6 
    └── tail@0.4.0 

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/Cellar/node/7.3.0/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-sim" "ios-deploy"
npm ERR! node v7.3.0
npm ERR! npm  v3.10.10
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 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/usuariobr/npm-debug.log

Encontrei a solução, antes de instalar o ios-deploy tive que executar esse comando:

sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer

Parece que tem que ativar o commandline do xcode.

Olá Gustavo,

Estou no OSX 10.12.5, considerando o link da documentação que o Sérgio Lopes citou anteriormente, para mim funcionou a instalação após disparar o seguinte comando:

sudo npm -g --unsafe-perm=true --allow-root install ios-sim ios-deploy