DeviceFarmer / stf

Control and manage Android devices from your browser.
https://devicefarmer.github.io
Other
3.52k stars 497 forks source link

While building the project on ubuntu, an error occurs "rootDirectory” #707

Closed qianmianyao closed 1 year ago

qianmianyao commented 1 year ago

While building the project on ubuntu, an error occurs


option to uppercase, replacing dashes with underscores and prefixing it with
`STF_APP_` (e.g. `STF_APP_AUTH_URL`).

"rootDirectory" not specified or is invalid
2023-09-13T06:53:15.240Z FTL/cli:local 26420 [*] Child process had an error ExitError: Exit code "1"
    at ChildProcess.<anonymous> (/home/qianmianyao/.local/share/pnpm/global/5/.pnpm/@devicefarmer+stf@3.6.6/node_modules/@devicefarmer/stf/lib/util/procutil.js:49:23)
    at ChildProcess.emit (node:events:511:28)
    at ChildProcess._handle.onexit (node:internal/child_process:293:12)```
qianmianyao commented 1 year ago

../../.local/share/pnpm/global/5/.pnpm/@devicefarmer+stf@3.6.6/node_modules/@dev icefarmer/stf/lib/cli app

Options: -h, --help Show help. [boolean] -V, --version Show version. [boolean] --auth-url, -a URL to the auth unit. [string] [required] --port, -p The port to bind to. [number] [default: 7105] --secret, -s The secret to use for auth JSON Web Tokens. Anyone who knows this token can freely enter the system if they want, so keep it safe. [string] [required] --ssid, -i The name of the session ID cookie. [string] [default: "ssid"] --user-profile-url URL to an external user profile page. [string] --websocket-url, -w URL to the websocket unit. [string] [required]

Each option can be be overwritten with an environment variable by converting the option to uppercase, replacing dashes with underscores and prefixing it with STF_APP_ (e.g. STF_APP_AUTH_URL).

"rootDirectory" not specified or is invalid 2023-09-13T06:58:28.372Z INF/api 27101 [] Sending output to "tcp://127.0.0.1:7113" 2023-09-13T06:58:28.373Z INF/api 27101 [] Receiving input from "tcp://127.0.0.1:7111" 2023-09-13T06:58:28.373Z INF/api 27101 [] Sending output to "tcp://127.0.0.1:7116" 2023-09-13T06:58:28.373Z INF/api 27101 [] Receiving input from "tcp://127.0.0.1:7114" 2023-09-13T06:58:28.379Z FTL/cli:local 27041 [*] Child process had an error ExitError: Exit code "1" at ChildProcess. (/home/qianmianyao/.local/share/pnpm/global/5/.pnpm/@devicefarmer+stf@3.6.6/node_modules/@devicefarmer/stf/lib/util/procutil.js:49:23) at ChildProcess.emit (node:events:511:28) at ChildProcess._handle.onexit (node:internal/child_process:293:12)

denis99999 commented 1 year ago

@qianmianyao it seems like this is due to your building environment, first make sure you don't have any STF_* environment variables that could interact with the STF building, second take a look at a similar problem here, then try using nvm with node version 17.9.0 and let me know if it works better?

qianmianyao commented 1 year ago

@qianmianyao it seems like this is due to your building environment, first make sure you don't have any STF_* environment variables that could interact with the STF building, second take a look at a similar problem here, then try using nvm with node version 17.9.0 and let me know if it works better?

Thank you. It's fixed.