美文网首页
mac上安装react脚手架create react app报错

mac上安装react脚手架create react app报错

作者: 粥蛋蛋 | 来源:发表于2020-03-26 15:24 被阅读0次

对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

相关文章

网友评论

      本文标题:mac上安装react脚手架create react app报错

      本文链接:https://www.haomeiwen.com/subject/vsjcuhtx.html