插件报错!
Closed this issue · 6 comments
forliuyifei commented
折腾了一晚上, 重新部署, 最终又是安装这个插件使用的时候报错, 哭晕.
好像多插几个豆瓣卡片就这样.
$ hexo g
INFO DPlayer.min.css is not found in this version of dplayer, skip it.
INFO Start processing
(node:15176) UnhandledPromiseRejectionWarning: Error: Not Found
at Request.callback (C:\Users\Xin\Desktop\hexo\loafing.cn\node_modules\superagent\lib\node\index.js:883:15)
at IncomingMessage.<anonymous> (C:\Users\Xin\Desktop\hexo\loafing.cn\node_modules\superagent\lib\node\index.js:1126:20)
at Stream.emit (events.js:310:20)
at Unzip.<anonymous> (C:\Users\Xin\Desktop\hexo\loafing.cn\node_modules\superagent\lib\node\unzip.js:53:12)
at Unzip.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:15176) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15176) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:15176) UnhandledPromiseRejectionWarning: Error: Not Found
at Request.callback (C:\Users\Xin\Desktop\hexo\loafing.cn\node_modules\superagent\lib\node\index.js:883:15)
at IncomingMessage.<anonymous> (C:\Users\Xin\Desktop\hexo\loafing.cn\node_modules\superagent\lib\node\index.js:1126:20)
at Stream.emit (events.js:310:20)
at Unzip.<anonymous> (C:\Users\Xin\Desktop\hexo\loafing.cn\node_modules\superagent\lib\node\unzip.js:53:12)
at Unzip.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:15176) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
TankNee commented
请问只有在使用到了这个插件的时候会报这个错是吗?
还是说使用一个豆瓣卡片时没有问题,但是用多个的时候有问题?
我看你这里的报错是superagent
的问题,但我没看到是这个插件的node_modules
包报错.
可以详细说一下你的复现过程吗?
forliuyifei commented
- 先按要求安装插件
- hexo clean
- hexo g
- hexo s
- 随便找篇文章,复制你的三个样板过去,刷新页面成功,后来我再加个自己最近看的天浴,
{% douban movie 1302836 %}
,刷新不出,我还以为是因为禁片所以不给未登录情况加载,又随便加了个别的,还是没反应。 - 一看Git Bash命令窗口,报错!!!
- 我还以为是其它地方改错了,疯狂Crtl+Z,还是没能解决,连本地都没法运行了。
- 无奈重新初始化一个新的文件夹,复制粘贴重来,挨个加插件,最后又是到了豆瓣卡片插件这里出问题,按时间逆序查看
node_modules
,报错信息里面的内容就是那几个新增的文件夹名称,superagent、unpanzip啥的,忘记了。 - 卸载插件又一切正常
TankNee commented
forliuyifei commented
TankNee commented
TankNee commented
问题已经解决了