SillyTavern / SillyTavern-Launcher

Launcher scripts for SillyTavern and ST-Extras.
MIT License
215 stars 58 forks source link

[BUG] Launcher is not setting the NODE_ENV environment variable. #77

Closed Cohee1207 closed 1 month ago

Cohee1207 commented 1 month ago

Environment

🪟 Windows

System

Any Windows

Describe the problem

The startup scripts in the main repo set the NODE_ENV to production. https://github.com/SillyTavern/SillyTavern/blob/5a4e23f62f12d3b91d01d261d52a3e78abff8492/Start.bat#L3

This doesn't happen when using the launcher.

Additional info

Why is it bad?

  1. The server will report as running in an undefined environment upon startup.
  2. Some libraries may not include additional optimizations that are only activated in production.

How to fix?

Add set NODE_ENV=production at the very start of the launcher.bat or in the server startup string.

Please tick the boxes

deffcolony commented 1 month ago

this issue has now been fixed at

https://github.com/SillyTavern/SillyTavern-Launcher/commit/3c6bca60065e3fd69faad98e51ffd292689e1414#diff-a0205db631f5d0cd7cb7ccd40570bf1addb891e7775d7aa8cba136ee3b30834dR21 and https://github.com/SillyTavern/SillyTavern-Launcher/commit/a07fa2eea096dc455b1e0df2eab71d8598860ad8