首页 > 解决方案 > '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

谢谢。

标签: node.jsreactjswindowsnpmnodes

解决方案


推荐阅读