pm2 fork mode require()s the resolved script rather than spawning a shell, and on o2switch `npm` resolves to CloudLinux's bash npm_wrapper, so pm2 crashed instantly (SyntaxError) and restart-looped forever. Point pm2 at tsx's real ESM entry (node_modules/tsx/dist/cli.mjs) instead. Also renames the pm2 process to video-downloader-worker. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
69 lines
1.8 KiB
JSON
69 lines
1.8 KiB
JSON
{
|
|
"name": "ombrora-ytdlp",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "index.js",
|
|
"directories": {
|
|
"doc": "docs"
|
|
},
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build --webpack",
|
|
"start": "node server.js",
|
|
"test": "jest",
|
|
"worker": "tsx worker/index.ts",
|
|
"worker:cleanup": "tsx worker/cron-cleanup.ts",
|
|
"worker:pm2:start": "pm2 start ecosystem.config.cjs",
|
|
"worker:pm2:stop": "pm2 stop ecosystem.config.cjs",
|
|
"worker:pm2:restart": "pm2 restart ecosystem.config.cjs",
|
|
"worker:pm2:status": "pm2 status video-downloader-worker",
|
|
"worker:pm2:logs": "pm2 logs video-downloader-worker",
|
|
"db:migrate": "prisma migrate dev",
|
|
"db:migrate:deploy": "prisma migrate deploy",
|
|
"db:generate": "prisma generate",
|
|
"deploy": "bash scripts/deploy.sh"
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "node",
|
|
"transform": {
|
|
"^.+\\.tsx?$": "@swc/jest"
|
|
},
|
|
"moduleNameMapper": {
|
|
"^@/(.*)$": "<rootDir>/src/$1"
|
|
},
|
|
"testMatch": [
|
|
"**/__tests__/**/*.test.ts"
|
|
]
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"dependencies": {
|
|
"@prisma/adapter-mariadb": "^7.9.1",
|
|
"@prisma/client": "^7.9.1",
|
|
"dotenv": "^17.4.2",
|
|
"mariadb": "^3.5.3",
|
|
"next": "^16.3.0",
|
|
"next-intl": "^4.13.6",
|
|
"next-themes": "^0.4.6",
|
|
"pm2": "^7.0.3",
|
|
"prisma": "^7.9.1",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8"
|
|
},
|
|
"devDependencies": {
|
|
"@swc/core": "^1.15.47",
|
|
"@swc/jest": "^0.2.39",
|
|
"@tailwindcss/postcss": "^4.3.3",
|
|
"@types/jest": "^30.0.0",
|
|
"@types/node": "^26.2.0",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.4",
|
|
"jest": "^30.4.2",
|
|
"jest-environment-node": "^30.4.1",
|
|
"tailwindcss": "^4.3.3",
|
|
"tsx": "^4.23.12",
|
|
"typescript": "^7.0.2"
|
|
}
|
|
}
|