lyswhut / lx-music-sync-server

运行在Node.js上的LX Music数据同步服务
Apache License 2.0
537 stars 146 forks source link

执行“npm run build”报错 #46

Closed ZGJRIJ closed 1 year ago

ZGJRIJ commented 1 year ago

系统:ArchLinux 架构:X86_64 目录为/opt/lx-music-sync-server/ 使用root用户执行“npm run build”报错如下

> lx-music-sync-server@2.0.0 build
> rimraf server && tsc --project tsconfig.json && tsc-alias -p tsconfig.json

error TS5058: The specified path does not exist: 'tsconfig.json'.

执行“find -name tsconfig.json”查找文件tsconfig.json,结果如下 ./node_modules/@tsconfig/node12/tsconfig.json ./node_modules/@tsconfig/node14/tsconfig.json ./node_modules/@tsconfig/node16/tsconfig.json ./node_modules/@tsconfig/node10/tsconfig.json ./node_modules/fastq/test/tsconfig.json ./node_modules/ts-node/node_modules/@tsconfig/node16/tsconfig.json ./node_modules/ts-node/node10/tsconfig.json ./node_modules/ts-node/node12/tsconfig.json ./node_modules/ts-node/node14/tsconfig.json ./node_modules/ts-node/node16/tsconfig.json

lyswhut commented 1 year ago

releases下载的压缩包不包含源码,是已经build过后的代码,不需要再npm run build,注意安装依赖部分的说明

ZGJRIJ commented 1 year ago

releases下载的压缩包不包含源码,是已经build过后的代码,不需要再npm run build,注意安装依赖部分的说明

PM2 | App [lx-music-sync-server:0] starting in -fork mode- PM2 | App [lx-music-sync-server:0] online 0|lx-music-sync-server | Load env: 0|lx-music-sync-server | PORT: 7002 0|lx-music-sync-server | Load config: /opt/lx-music-sync-server/config.js 0|lx-music-sync-server | 数据迁移:v1 -> v2 0|lx-music-sync-server | Error: ENOENT: no such file or directory, rename '/opt/lx-music-sync-server/data/users/ld_946490/snapshot' -> '/opt/lx-music-sync-server/data/users/ld_946490/list/snapshot' 0|lx-music-sync-server | at Object.renameSync (node:fs:1057:3) 0|lx-music-sync-server | at exports.default (/opt/lx-music-sync-server/server/utils/migrate/v2.js:20:27) 0|lx-music-sync-server | at exports.default (/opt/lx-music-sync-server/server/utils/migrate/index.js:8:22) 0|lx-music-sync-server | at Object. (/opt/lx-music-sync-server/server/index.js:212:35) 0|lx-music-sync-server | at Module._compile (node:internal/modules/cjs/loader:1241:14) 0|lx-music-sync-server | at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) 0|lx-music-sync-server | at Module.load (node:internal/modules/cjs/loader:1091:32) 0|lx-music-sync-server | at Module._load (node:internal/modules/cjs/loader:938:12) 0|lx-music-sync-server | at Module.require (node:internal/modules/cjs/loader:1115:19) 0|lx-music-sync-server | at Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:101:39) { 0|lx-music-sync-server | errno: -2, 0|lx-music-sync-server | syscall: 'rename', 0|lx-music-sync-server | code: 'ENOENT', 0|lx-music-sync-server | path: '/opt/lx-music-sync-server/data/users/ld_946490/snapshot', 0|lx-music-sync-server | dest: '/opt/lx-music-sync-server/data/users/ld_946490/list/snapshot' 0|lx-music-sync-server | } PM2 | App [lx-music-sync-server:0] exited with code [1] via signal [SIGINT] PM2 | App [lx-music-sync-server:0] will restart in 15000ms

按照文档执行也报错

lyswhut commented 1 year ago

日志显示移动/opt/lx-music-sync-server/data/users/ld_946490/snapshot目录失败,试试刚发布的v2.0.1

ZGJRIJ commented 1 year ago

好了,服务正常启动了,感谢大佬!