node.js - 'REACT_APP_VERSION' 不是内部或外部命令、可运行程序或批处理文件
问题描述
我正在尝试在我的 Windows 环境中运行一个反应项目,但它引发了以下错误。之前,这个项目在 Ubuntu 上也有同样的效果。它在我更改操作系统后开始发生。我怎样才能解决这个问题?
我只是在运行npm start命令。
> REACT_APP_VERSION=$npm_package_version react-scripts -r @cypress/instrument-cra start
'REACT_APP_VERSION' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! PROJECT NAME start: `REACT_APP_VERSION=$npm_package_version react-scripts -r @cypress/instrument-cra start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the PROJECT NAME start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
更新 我刚刚使用以下软件包修复了它。这是关于窗户的。 https://www.npmjs.com/package/cross-env
谢谢。
解决方案
推荐阅读
- html - 如何选择一个项目
- 里面的标签
- 使用 VBA 在 HTML 中标记
- 里面的标签
- sql-server - Visual Studio SSIS 如何处理扩展和包部署?
- python - 使用 Apache Spark 和 python 运行简单的字数统计程序
- regex - 找出方括号内的整个字符串并使用正则表达式匹配方括号内的一个单词
- html - 如何编辑 SVG 文件中的文本?(不是以编程方式)
- c# - 创建 2 个对象而不是 1 个
- arrays - 如何将整数分解为 2 的幂数组?
- javascript - 正确使用 React getDerivedStateFromProps 控制子组件状态
- android - 观察 EditText 键时 OnBackPressed 不起作用
- javascript - 更换站点时停止间隔功能