npm ERR! reminder@0.1.0 build: `CI= react-scripts build`



我有一个基本的reactjs应用程序。
我想把它部署到netlify。要在netlify上部署它,我需要首先构建它。
但是当我运行npm run build时,它抛出以下错误:

我的npm版本是6.14.8。

CI= react-scripts build
'CI' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reminder@0.1.0 build: `CI= react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reminder@0.1.0 build 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:
npm ERR!     C:UsersAmarjeetAppDataRoamingnpm-cache_logs2021-01-17T11_18_13_129Z-debug.log

请打开package.json请找到"build": "CI= react-scripts build"将其改为"build": "react-scripts build",然后再次运行NPM run build应该没问题

进入包。Json文件,并从"build": CI= react-scripts build"到';react-scripts build ';,然后运行命令NPM run build it will works.

进入package.json文件并更改build: "CI= react-script build"toreact-script build,然后在终端运行npm run build。现在它将在你的文件中创建一个构建文件夹。

相关内容

  • 没有找到相关文章

最新更新