添加React-Bootstrap

时间:2017-10-17 13:06:59

标签: twitter-bootstrap reactjs npm

我在React js遇到问题,当我使用npm安装bootstrap时,项目拒绝使用npm start命令在浏览器中运行。

我正在关注此React-Bootstrap链接https://react-bootstrap.github.io/getting-started.html

以下是我得到的错误:

  

sh:react-scripts:命令找不到npm ERR!文件sh npm ERR!码   ELIFECYCLE npm ERR! errno ENOENT npm ERR!系统调用生成npm ERR!   food_app@0.1.0 start:react-scripts start npm ERR!产生ENOENT npm   呃!错误的ERR!在food_app@0.1.0启动脚本失败。错误的ERR!   这可能不是npm的问题。可能有额外的   记录输出上面。

     

npm ERR!可以在以下位置找到此运行的完整日志:npm ERR!
  /Users/haleem/.npm/_logs/2017-10-17T12_58_51_812Z-debug.log

1 个答案:

答案 0 :(得分:0)

您需要在本地运行之前安装软件包:

对于新项目:

npm install --save create-react-app

对于现有项目:

npm install
相关问题