melody icon indicating copy to clipboard operation
melody copied to clipboard

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

Open zheng7fu2 opened this issue 2 years ago • 4 comments

[email protected] 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

zheng7fu2 avatar Oct 09 '22 04:10 zheng7fu2

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

foamzou avatar Oct 18 '22 13:10 foamzou

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

atomicink avatar Oct 20 '22 01:10 atomicink

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

JuZi233 avatar Nov 14 '22 08:11 JuZi233

可以先手动删除 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

foamzou avatar Nov 14 '22 15:11 foamzou