对mac开发真的很不熟悉,今天安装create react app时报错:
npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
百度解决方案,说把npm的安装镜像改成淘宝镜像就ok
npm config set registry https://registry.npm.taobao.org
设置成功运行
npm install -g create-react-app
报错
checkPermissions Missing write access to /usr/local/lib/node_modules
没有权限,貌似上次安装vue脚手架时也是出现了一样的问题。
这一类权限问题应该在npm命令前加上sudo就ok
sudo npm install -g create-react-app
网友评论