Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 使用npx karin pm2指令出错 #183

Closed
Aliorpse opened this issue Sep 30, 2024 · 0 comments · Fixed by #180
Closed

Bug: 使用npx karin pm2指令出错 #183

Aliorpse opened this issue Sep 30, 2024 · 0 comments · Fixed by #180
Labels
bug Something isn't working

Comments

@Aliorpse
Copy link

警告: 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

  • 确保您使用的是最新版本的Karin
  • 确保您的问题尚未在 Issues 列表中提出.
  • 确保您的问题不是由于您的代码错误导致的.

描述问题

npx karin pm2 报错

复现步骤

详细描述如何复现该问题:

使用上述指令

预期行为

完成后台启动

实际行为

报错

环境信息

  • 操作系统:winserver 2022
  • Node.js 版本:20.15.1
  • 项目版本:latest

附加信息

报错:

The command line is too long.

    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:519:28)
    at Pipe.<anonymous> (node:net:338:12) {
  code: 1,
  killed: false,
  signal: null,

执行npx karin pm2后karin调用的指令:

pm2 start ./config/config/pm2.yaml --env {"ACLOCAL_PATH":"C:\\Program Files\\Git\\mingw64\\share\\aclocal;C:\\Program Files\\Git\\usr\\share\\aclocal","ALLUSERSPROFILE":"C:\\ProgramData","APPDATA":"C:\\Users\\Administrator\\AppData\\Roaming","CLIENTNAME":"ALIORPSE","COLOR":"0","COMMONPROGRAMFILES":"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files","CommonProgramW6432":"C:\\Program Files\\Common Files","COMPUTERNAME":"WIN-N26TSCOF47Q","COMSPEC":"C:\\WINDOWS\\system32\\cmd.exe","CONFIG_SITE":"C:/Program Files/Git/etc/config.site","DISPLAY":"needs-to-be-defined","DriverData":"C:\\Windows\\System32\\Drivers\\DriverData","EDITOR":"C:\\WINDOWS\\notepad.exe","EXEPATH":"C:\\Program Files\\Git","FPS_BROWSER_APP_PROFILE_STRING":"Internet Explorer","FPS_BROWSER_USER_PROFILE_STRING":"Default","HOME":"C:\\Users\\Administrator","HOMEDRIVE":"C:","HOMEPATH":"\\Users\\Administrator","HOSTNAME":"WIN-N26TSCOF47Q","INFOPATH":"C:\\Program Files\\Git\\mingw64\\local\\info;C:\\Program Files\\Git\\mingw64\\share\\info;C:\\Program Files\\Git\\usr\\local\\info;C:\\Program Files\\Git\\usr\\share\\info;C:\\Program Files\\Git\\usr\\info;C:\\Program Files\\Git\\share\\info","INIT_CWD":"C:\\Users\\Administrator\\Desktop\\karin","karin_app_lang":"js","karin_app_mode":"prod","karin_app_pkg":"pnpm","karin_app_runner":"pm2","karin_app_start_count":"0","karin_app_version":"0.12.14","karin_app_watch":"no","LC_CTYPE":"zh_CN.UTF-8","LITELOADERQQNT_PROFILE":"C:\\Users\\Administrator\\Documents\\LiteloaderQQNT","LOCALAPPDATA":"C:\\Users\\Administrator\\AppData\\Local","LOGONSERVER":"\\\\WIN-N26TSCOF47Q","MANPATH":"C:\\Program Files\\Git\\mingw64\\local\\man;C:\\Program Files\\Git\\mingw64\\share\\man;C:\\Program Files\\Git\\usr\\local\\man;C:\\Program Files\\Git\\usr\\share\\man;C:\\Program Files\\Git\\usr\\man;C:\\Program Files\\Git\\share\\man","MINGW_CHOST":"x86_64-w64-mingw32","MINGW_PACKAGE_PREFIX":"mingw-w64-x86_64","MINGW_PREFIX":"C:/Program Files/Git/mingw64","MSYS":"disable_pcon","MSYSTEM":"MINGW64","MSYSTEM_CARCH":"x86_64","MSYSTEM_CHOST":"x86_64-w64-mingw32","MSYSTEM_PREFIX":"C:/Program Files/Git/mingw64","NODE":"C:\\Program Files\\nodejs\\node.exe","NODE_PATH":"C:\\Users\\Administrator\\Desktop\\karin\\node_modules\\.pnpm\\node-karin@0.12.14\\node_modules\\node-karin\\lib\\cli\\node_modules;C:\\Users\\Administrator\\Desktop\\karin\\node_modules\\.pnpm\\node-karin@0.12.14\\node_modules\\node-karin\\lib\\node_modules;C:\\Users\\Administrator\\Desktop\\karin\\node_modules\\.pnpm\\node-karin@0.12.14\\node_modules\\node-karin\\node_modules;C:\\Users\\Administrator\\Desktop\\karin\\node_modules\\.pnpm\\node-karin@0.12.14\\node_modules;C:\\Users\\Administrator\\Desktop\\karin\\node_modules\\.pnpm\\node_modules","npm_command":"exec","npm_config_better_sqlite3_binary_host_mirror":"https://registry.npmmirror.com/-/binary/better-sqlite3","npm_config_cache":"C:\\Users\\Administrator\\AppData\\Local\\npm-cache","npm_config_canvas_binary_host_mirror":"https://registry.npmmirror.com/-/binary/canvas","npm_config_globalconfig":"C:\\Users\\Administrator\\AppData\\Roaming\\npm\\etc\\npmrc","npm_config_global_prefix":"C:\\Users\\Administrator\\AppData\\Roaming\\npm","npm_config_init_module":"C:\\Users\\Administrator\\.npm-init.js","npm_config_local_prefix":"C:\\Users\\Administrator\\Desktop\\karin","npm_config_node_gyp":"C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js","npm_config_node_sqlite3_binary_host_mirror":"https://registry.npmmirror.com/-/binary/sqlite3","npm_config_noproxy":"","npm_config_npm_version":"10.8.3","npm_config_prefix":"C:\\Users\\Administrator\\AppData\\Roaming\\npm","npm_config_puppeteer_download_base_url":"https://registry.npmmirror.com/binaries/chrome-for-testing","npm_config_puppeteer_download_host":"https://registry.npmmirror.com/mirrors","npm_config_registry":"https://registry.npmmirror.com","npm_config_sass_binary_site":"https://registry.npmmirror.com/-/binary/node-sass","npm_config_sharp_binary_host":"https://registry.npmmirror.com/-/binary/sharp","npm_config_sharp_libvips_binary_host":"https://registry.npmmirror.com/-/binary/sharp-libvips","npm_config_userconfig":"C:\\Users\\Administrator\\.npmrc","npm_config_user_agent":"npm/10.8.3 node/v20.15.1 win32 x64 workspaces/false","npm_execpath":"C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js","npm_lifecycle_event":"npx","npm_lifecycle_script":"karin","npm_node_execpath":"C:\\Program Files\\nodejs\\node.exe","npm_package_json":"C:\\Users\\Administrator\\Desktop\\karin\\package.json","npm_package_name":"karin","npm_package_version":"1.0.0","NUMBER_OF_PROCESSORS":"4","ORIGINAL_PATH":"C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Users\\Administrator\\bin;C:\\Program Files\\Zulu\\zulu-21\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\nodejs;C:\\Program Files\\Redis;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Bandizip;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit;C:\\ffmpeg;C:\\Program Files\\dotnet;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python312\\Scripts;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python312;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Launcher;C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Administrator\\AppData\\Roaming\\npm;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\users\\administrator\\appdata\\roaming\\python\\python312\\scripts;C:\\users\\administrator\\.local\\bin","ORIGINAL_TEMP":"C:/Users/ADMINI~1/AppData/Local/Temp/2","ORIGINAL_TMP":"C:/Users/ADMINI~1/AppData/Local/Temp/2","OS":"Windows_NT","PATH":"C:\\Users\\Administrator\\Desktop\\karin\\node_modules\\.bin;C:\\Users\\Administrator\\Desktop\\karin\\node_modules\\.bin;C:\\Users\\Administrator\\Desktop\\node_modules\\.bin;C:\\Users\\Administrator\\node_modules\\.bin;C:\\Users\\node_modules\\.bin;C:\\node_modules\\.bin;C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\@npmcli\\run-script\\lib\\node-gyp-bin;C:\\Users\\Administrator\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\local\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Users\\Administrator\\bin;C:\\Program Files\\Zulu\\zulu-21\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\nodejs;C:\\Program Files\\Redis;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Bandizip;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit;C:\\ffmpeg;C:\\Program Files\\dotnet;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python312\\Scripts;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python312;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Launcher;C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Administrator\\AppData\\Roaming\\npm;C:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\users\\administrator\\appdata\\roaming\\python\\python312\\scripts;C:\\users\\administrator\\.local\\bin;C:\\Program Files\\Git\\usr\\bin\\vendor_perl;C:\\Program Files\\Git\\usr\\bin\\core_perl","PATHEXT":".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JSE;.WSF;.WSH;.MSC","PKG_CONFIG_PATH":"C:\\Program Files\\Git\\mingw64\\lib\\pkgconfig;C:\\Program Files\\Git\\mingw64\\share\\pkgconfig","PKG_CONFIG_SYSTEM_INCLUDE_PATH":"C:/Program Files/Git/mingw64/include","PKG_CONFIG_SYSTEM_LIBRARY_PATH":"C:/Program Files/Git/mingw64/lib","PLINK_PROTOCOL":"ssh","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 190 Stepping 0, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"be00","ProgramData":"C:\\ProgramData","PROGRAMFILES":"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)","ProgramW6432":"C:\\Program Files","PROMPT":"$P$G","PSModulePath":"C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules","PUBLIC":"C:\\Users\\Public","PWD":"C:/Users/Administrator/Desktop/karin","SESSIONNAME":"RDP-Tcp#0","SHELL":"C:\\Program Files\\Git\\usr\\bin\\bash.exe","SHLVL":"2","SSH_ASKPASS":"C:/Program Files/Git/mingw64/bin/git-askpass.exe","SYSTEMDRIVE":"C:","SYSTEMROOT":"C:\\WINDOWS","TEMP":"C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2","TERM":"xterm","TERM_PROGRAM":"mintty","TERM_PROGRAM_VERSION":"3.7.1","TMP":"C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2","TMPDIR":"C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2","USERDOMAIN":"WIN-N26TSCOF47Q","USERDOMAIN_ROAMINGPROFILE":"WIN-N26TSCOF47Q","USERNAME":"Administrator","USERPROFILE":"C:\\Users\\Administrator","WINDIR":"C:\\WINDOWS","ZES_ENABLE_SYSMAN":"1","_":"C:/Program Files/nodejs/node.exe"}
@Aliorpse Aliorpse added the bug Something isn't working label Sep 30, 2024
@sj817 sj817 closed this as completed in 5b64fc5 Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant