【发布时间】:2019-08-04 20:36:03
【问题描述】:
尝试使用 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
【问题讨论】:
-
你查看日志内容了吗?
-
是不是和stackoverflow.com/q/57314473/6309类似,本身就是重复的?
-
日志对我来说没有多大意义 X,x
-
这看起来和我的问题很相似!我可以像助手说的那样卸载 gh-pages 模块,但是如何安装特定版本的 gh-pages?
-
哈!我将在上面回答我自己的问题...可以通过在 gh-pages 之后添加 @ 来安装旧版本。示例:npm i gh-pages@2.0.1
标签: html node.js github npm github-pages