react 启动报错

Posted on 2019-02-13 14:49  亭-亭  阅读(171)  评论(0)    收藏  举报

1.启动报错Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

在 .eslintrc.js 配置文件的rule中添加  

"linebreak-style": [0 ,"error", "windows"]             //允许windows开发环境
 
2.启动报错npm ERR! A complete log of this run can be found in: npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\
 
原因是在搭建脚手架的时候,缺少一个依赖包(react-scripts  ),要下载   命令行输入:  npm install react-scripts   
 
 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3