mac 安装weex 提示“Please try running this command again as root/Administrator”

我们在安装weex时, 一般先要安装node.js

在安装node.js之后,在命令行输入

npm install weex-toolkit -g

产生如图结果:

mac 安装weex 提示“Please try running this command again as root/Administrator”


解决办法

输入命令

 sudo chown -R $USER /usr/local 

随后要求输入用户密码,即你的开机密码

然后大功告成, 继续weex安装吧