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

Run the app, with opinionated template, in dev mode #36

Closed
2 of 4 tasks
betoecd opened this issue Jun 29, 2023 · 2 comments
Closed
2 of 4 tasks

Run the app, with opinionated template, in dev mode #36

betoecd opened this issue Jun 29, 2023 · 2 comments
Assignees
Labels
analysis In analysis for development good first issue Good for newcomers

Comments

@betoecd
Copy link

betoecd commented Jun 29, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Running new project in mod dev.

Steps to reproduce

  1. Create a new project expressots new expressots-api -t opinionated -p yarn
  2. Create a new .env file based on .env.example
  3. yarn run dev

Expected behavior

Start the application.

Package version

1.4.2

Node.js version

19.8.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

➜  yarn run dev
yarn run v1.22.19
$ tsnd -r dotenv/config -r tsconfig-paths/register ./src/main.ts
[INFO] 20:25:07 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.1, typescript ver. 4.9.5)
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable GTK_EXE_PREFIX_VSCODE_SNAP_ORIG is not defined.
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable GDK_BACKEND_VSCODE_SNAP_ORIG is not defined.
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable LOCPATH_VSCODE_SNAP_ORIG is not defined.
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable GSETTINGS_SCHEMA_DIR_VSCODE_SNAP_ORIG is not defined.
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable XDG_CONFIG_DIRS_VSCODE_SNAP_ORIG is not defined.
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable GIO_MODULE_DIR_VSCODE_SNAP_ORIG is not defined.
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable GTK_PATH_VSCODE_SNAP_ORIG is not defined.
[2023-06-29 20:25:10] [core-api] [env-validator-provider] info: Environment variable GTK_IM_MODULE_FILE_VSCODE_SNAP_ORIG is not defined.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@rsaz rsaz added good first issue Good for newcomers analysis In analysis for development labels Jun 30, 2023
@rsaz rsaz self-assigned this Jun 30, 2023
@rsaz
Copy link
Member

rsaz commented Jun 30, 2023

Hi @betoecd

This is our environment validator provider in action. It just detected that you have a bunch of environments declared with the names mentioned above that are not being used as the value is not define.
To unblock your development you have few options:
1 - In the providers/application you can comment or remove the env-validator-provider

class App extends Application {
    protected configureServices(): void {
        Environments.checkAll(); // comment this line
    }

    protected postServerInitialization(): void {}

    protected serverShutdown(): void {
        log(LogLevel.Info, "Server is shutting down", "logger-provider");
        super.serverShutdown();
    }
}

const appInstance = new App();

export { appInstance as App };

2 - The second option is removing your non used env variables or assign "None" value to them if you are not planning to delete them.
setx vscode_git_askpass_extra_args "None"

3 - The third option is, we will change our provider just to take in consideration the variables created from the .env and not the entire pc environment. This approach will solve this problem.

Issue Ref: #19

@betoecd
Copy link
Author

betoecd commented Jun 30, 2023

Tks @rsaz, the first option solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis In analysis for development good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants