Binaryify / NeteaseCloudMusicApi

网易云音乐 Node.js API service
https://gitlab.com/Binaryify/neteasecloudmusicapi
30.29k stars 15.78k forks source link

部署到vercel出现问题(返回500) #1796

Closed Wangs-official closed 1 year ago

Wangs-official commented 1 year ago

环境

出现问题

<请清晰描述出现的问题,不要使用xxx不行之类的模糊不清的语句,我没有读心术>

按照教程部署到vercel后,访问出现500错误

image

这是日志,应该是一个只读问题导致的(日志堆在一起了)

Unhandled Promise Rejection     {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: EROFS: read-only file system, open '/var/task/anonymous_token'","reason":{"errorType":"Error","errorMessage":"EROFS: read-only file system, open '/var/task/anonymous_token'","code":"EROFS","errno":-30,"syscall":"open","path":"/var/task/anonymous_token","stack":["Error: EROFS: read-only file system, open '/var/task/anonymous_token'","    at Object.openSync (node:fs:590:3)","    at Object.writeFileSync (node:fs:2202:35)","    at start (/var/task/app.js:8:8)","    at Object.<anonymous> (/var/task/app.js:16:1)","    at Module._compile (node:internal/modules/cjs/loader:1198:14)","    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)","    at Module.load (node:internal/modules/cjs/loader:1076:32)","    at Function.Module._load (node:internal/modules/cjs/loader:911:12)","    at Module.require (node:internal/modules/cjs/loader:1100:19)","    at Module.Hook._require.Module.require (/var/task/___vc/__launcher.js:2160:44)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: EROFS: read-only file system, open '/var/task/anonymous_token'","    at process.<anonymous> (file:///var/runtime/index.mjs:1250:17)","    at process.emit (node:events:525:35)","    at emit (node:internal/process/promises:140:20)","    at processPromiseRejections (node:internal/process/promises:274:27)","    at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
Unknown application error occurred
Runtime.Unknown

在部署时看见了两个警告,不清楚是不是与此有关

WARN! Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
--
07:47:50.677 | > Installing Builder: @vercel/node@2.5.10
07:47:54.637 | Warning: Detected "engines": { "node": ">=12" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version

这个错误似乎和https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1795异常的相似

重现步骤

<请清晰描述重现步骤,调用的接口链接和参数以及命令行错误信息,最好贴上截图(命令行错误信息和接口返回内容)>

期待效果

<请清晰描述现在的效果和期待的效果>


维护项目都是业余时间,精力有限,我只能挑容易解决的issues处理,为了节约双方时间,请尽可能提供足够的有用的信息,给的信息不够我只能根据精力和时间看情况处理,如果模板信息看都不看就删掉,我不会进行任何回复,并且一个月后close掉issue

先看文档有没有相关说明,调用前须知必看,确认看完了调用前须知再发 issues

先在 issues 搜一下是否有相似问题,没有再发,否则直接关闭

不处理别人搭建的线上服务的问题,此项目不提供任何线上服务,请自行搭建

重现步骤尽量详细,不能含糊不清,包含请求地址和对应参数以及操作过程描述,不是每个人都喜欢猜别人遇到了什么问题和找参数一个个试,也比较浪费时间

如果不是提建议,提 issues 如果不照着模版来将不会优先处理或放着不管

460 cheating 的问题把 utils/request.js 里面的 headers['X-Real-IP'] 的注释取消掉就好

fuyifang commented 1 year ago

遇到了同样的问题 解决了吗?

Binaryify commented 1 year ago

再试试

fuyifang commented 1 year ago

再试试

可以用了

Wangs-official commented 1 year ago

万分感谢