npm全局安装包 $ npm config set prefix /usr/local $ sudo npm install -g create-react-app $ create-react-app my-app