首页 > 解决方案 > 使用`gh-pages`在github上部署`create-react-app`时出现问题

问题描述

我在部署使用create-react-app在 github 上使用gh-pages.

"file" argument must be a non-empty string
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-text-echo@0.1.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-text-echo@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我已经提到了这个链接这个

谁能帮我弄清楚到底是什么问题?

我的 github 项目链接是 - https://github.com/aagjalpankaj/react-text-echo

我的 package.json 文件是 - https://github.com/aagjalpankaj/react-text-echo/blob/master/package.json

标签: reactjsnpmgithub-pagescreate-react-app

解决方案


这是gh-pages 2.1.x降级gh-pages到版本的错误2.0

npm install gh-pages@2.0 --dev.

推荐阅读