foamzou / melody

我的音乐精灵

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] 源码安装后启动失败。Debian testing

zheng7fu2 opened this issue · comments

foamzou-melody@0.1.1 app
node backend/src/index.js

/root/melody/backend/src/service/media_fetcher/../../../bin/media-get [ '-h' ]
ℹ [media-get] Version: 0.2.8 11:50:20
ℹ [tmp path] use /tmp/melody-tmp-songs 11:50:20
/root/melody/backend/src/index.js:3
return this.replace(new RegExp(f, 'g'), r);
^

SyntaxError: Invalid regular expression: /*/: Nothing to repeat
at new RegExp ()
at String.replaceAll (/root/melody/backend/src/index.js:3:23)
at node:internal/assert/snapshot:28:61
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/loaders:331:7)
at nativeModuleRequire (node:internal/bootstrap/loaders:362:14)
at node:assert:1055:18
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/loaders:331:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/loaders:269:10)
at loadBuiltinModule (node:internal/modules/cjs/helpers:50:9)
at Module._load (node:internal/modules/cjs/loader:847:15)

Node.js v18.10.0

commented

在 mac 和 windows 的 18.10 均无法复现。请问有什么我遗漏的复现步骤吗?
@zheng7fu2 @atomicink

commented

我用的mac mini m1,手动下载的media-get并给了权限,测试可以单独运行
没有其他步骤

我也是这个错,莫名其妙的

commented

可以先手动删除 backend/src/index.js 这几行.

// NeteaseCloudMusicApi 有不兼容的代码。晚点提 PR 改下,这里先 hack
String.prototype.replaceAll = function (f, r) {
  return this.replace(new RegExp(f, 'g'), r);
};

然后升级下 NeteaseCloudMusicApi

cd backend
npm update NeteaseCloudMusicApi

最近比较懒,没有写代码。 @atomicink @JuZi233