当前位置: 动力学知识库 > 问答 > 编程问答 >

node.js - Errors building & emulating iOS with Ionic 2 App

问题描述:

I can't seem to be able to build or emulate in iOS. Xcode is up to date.

This is what I've tried so far:

  1. reinstalling npm
  2. ionic hooks add
  3. sudo remove ios
  4. sudo add ios (got errors when trying to emulate and build)
  5. sudo remove ios
  6. Adding ios without sudo (still errors trying to emulate and build)
  7. npm install -g ios-sim
  8. chown -R username .config/, files belong to me or root

It says iOS platform isn't installed when it definetly is.

I also don't understand how to unlink '/Users/sh/Desktop/PT/www/build/app.html'?

The screenshot below is for emulate but I get the exact same errors for build as well.

网友答案:

This fixed EACCES error:

sudo chown -R username /Users/username/desktop/folder

This allowed it to build and emulate correctly by installing again:

sudo npm install -g cordova 

However it is not coming up correctly in the emulator but that wasn't the scope of this particular question. The emulator does launch from the command line now.

分享给朋友:
您可能感兴趣的文章:
随机阅读: