ionic4项目添加ios平台问题

1、输入命令【ionic serve】报错

错误内容:

[ERROR] Unable to find command: /usr/local/bin/node /usr/local/bin/ionic serve

解决方法:升级ionic、cordova

更新(Windows):

npm install -g ionic@latest
npm install -g cordova@latest

更新(Mac):

sudo npm install -g ionic@latest
sudo npm install -g cordova@latest

2、输入命令【ionic cordova resources】报错

错误内容:

checkPermissions Missing write access to /usr/local/lib/node_modules path /usr/local/lib/node_modules

解决方法:

更新(Mac):

npm i -g cordova-res --unsafe-perm

更新(Mac):参考

sudo npm i -g cordova-res --unsafe-perm

3、输入命令【ionic cordova build ios】报错

错误内容:

An error occurred while running subprocess cordova

解决方法:

cordova platform add [email protected]
sudo npm install -g ios-deploy --unsafe-perm=true

 

你可能感兴趣的:(ionic问题解决方法)