Error in Defining Config Service: Variable Not Available

Is this the right way to define a config service? I'm getting an error telling me that the variable is not available:
export const configService = ConfigProvider.fromMap(
  new Map([["JWT_SECRET", import.meta.env.JWT_SECRET]])
);

  return Effect.runPromise(
    handle.pipe(
      Effect.provideService(UserService, UserServiceMock),
      Effect.provideService(ConfigProvider.ConfigProvider, configService)
    )
  );

The error says:
{
  _tag: 'MissingData',
  path: [ 'JWT_SECRET' ],
  message: 'Expected JWT_SECRET to exist in the process context'
}
Was this page helpful?