diff --git a/src/utils/classes/Plugin.ts b/src/utils/classes/Plugin.ts index 57dca5da..18833e23 100644 --- a/src/utils/classes/Plugin.ts +++ b/src/utils/classes/Plugin.ts @@ -25,12 +25,12 @@ export class Plugin { private _translations: { [key: string]: BaseTranslation } constructor(path: string) { - this._path = path + this._path = path.replace('file://', '') } public async load(): Promise { // check if the plugin.json is present - if (!await fs.existsSync(`${this._path}/plugin.json`)) + if (!fs.existsSync(`${this._path}/plugin.json`)) return this.stopLoad('plugin.json not found') // read plugin.json diff --git a/src/utils/types/environment.ts b/src/utils/types/environment.ts index 9957ab00..c35a13b8 100644 --- a/src/utils/types/environment.ts +++ b/src/utils/types/environment.ts @@ -25,9 +25,10 @@ export const env = cleanEnv(process.env, { export function checkEnvironmentVariables() { const config = mikroORMConfig[env.NODE_ENV] + // @ts-expect-error const isSqliteDatabase = !!config.dbName && !config.port - if (isSqliteDatabase) { + if (!isSqliteDatabase) { cleanEnv(process.env, { DATABASE_HOST: str(), DATABASE_PORT: num(),