尝试使用npm在github上部署网站时在终端中出现错误
我不知道该怎么尝试
PS C:\Users\user\modern_portfolio> npm run deploy
> modern_portfolio@1.0.0 deploy C:\Users\user\modern_portfolio
> gh-pages -d dist
The "file" argument must be of type string. Received type undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! modern_portfolio@1.0.0 deploy: `gh-pages -d dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the modern_portfolio@1.0.0 deploy 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:\Users\user\AppData\Roaming\npm-cache\_logs\2019-08-04T04_12_42_515Z-debug.log
答案 0 :(得分:0)
较新的2.1版存在一些问题。他们可能正在努力。恢复到2.0.1。
npm uninstall gh-pages
npm i gh-pages@2.0.1
npm run deploy // as usual