citizenfx/fivem

Node.js child process running "vite" launches txAdmin/c-server-monitor

dukeofsussex opened this issue · 0 comments

What happened?

I'm currently writing a resource to replace the webpack builder with a vite-based one.
However upon launching a Node.js child process using fork (used by yarn_builder.js) txAdmin initialises instead.

Any vite command launches txAdmin/c-server-monitor.

Workaround is to use spawn instead.

Expected result

txAdmin should remain dormant

Reproduction steps

Steps

  • Grab this minimum reproducible example resource (core files unchanged from original resource)
  • Extract to your resources directory
  • Install node dependency via preferred package manager
  • Configure server to load resource
  • Start server

Log

...
[    c-scripting-core] Creating script environments for yarn
[           resources] Started resource yarn
cfx> [         script:yarn] yarn run v1.22.5
[         script:yarn] 
[         script:yarn] Error: warning package.json: No license field
[         script:yarn] 
[         script:yarn] $ vite build
[         script:yarn] 
[ citizen-server-impl]         fff                          
[ citizen-server-impl]   cccc ff   xx  xx     rr rr    eee  
[ citizen-server-impl] cc     ffff   xx       rrr  r ee   e 
[ citizen-server-impl] cc     ff     xx   ... rr     eeeee  
[ citizen-server-impl]  ccccc ff   xx  xx ... rr      eeeee 
[ citizen-server-impl]                                      
[ citizen-server-impl] Authenticated with cfx.re Nucleus: <hidden>
[         script:yarn] [    c-server-monitor]   _______  ______             
[         script:yarn]               
[         script:yarn] [    c-server-monitor]  |  ___\ \/ / ___|  ___ _ ____   _____ _ __ 
[         script:yarn] [    c-server-monitor]  | |_   \  /\___ \ / _ \ '__\ \ / / _ \ '__|
[         script:yarn] [    c-server-monitor]  |  _|  /  \ ___) |  __/ |   \ V /  __/ |   
[         script:yarn] [    c-server-monitor]  |_|   /_/\_\____/ \___|_|    \_/ \___|_|   
[         script:yarn] �[38
[         script:yarn] ;5;218m[    c-server-monitor] -------------------------------- monitor ---
[         script:yarn] [    c-server-monitor] 
[         script:yarn] [    c-scripting-core] Creating script environments for
[         script:yarn]  monitor
[         script:yarn] 
[         script:yarn] �]0;txAdmin v6.0.2: default�
[         script:yarn] [18:13:26][tx:v6.0.2] Profile 'default' starting...
[         script:yarn] 
[         script:yarn] [18:13:26][tx:SetupProfile] =========================================================
[         script:yarn] 
[         script:yarn] [18:13:26][tx:SetupProfile] Creating new profile folder...
[         script:yarn] 
[         script:yarn] [18:13:26][tx:SetupProfile] Server profile was saved in 'D:/GitHub/gta-rp/txData/default'
...

Importancy

There's a workaround

Area(s)

FXServer

Specific version(s)

Server 7290 Windows

Additional information

No response