【发布时间】:2018-07-28 08:54:13
【问题描述】:
我根据此处描述的步骤创建了反应应用程序https://www.sitepoint.com/getting-started-react-beginners-guide/
npm i -g create-react-app
create-react-app myapp
yarn start
一切正常,所以我尝试按照此处所述安装 redux https://redux.js.org/docs/basics/UsageWithReact.html
npm install --save react-redux
我收到了这条消息
- react-redux@5.0.7 在 14.541 秒内添加了 3 个包,删除了 1061 个包并更新了 18 个包
现在当我尝试时
yarn start
我收到消息
yarn run v1.3.2
$ react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
怎么了?我不明白为什么 react-scripts 不起作用。我以为 --save 将第三方包添加到包的依赖项中,与其他包无关。 我感谢每一个建议我做错了什么以及如何解决它。 谢谢
【问题讨论】:
标签: reactjs npm redux installation