kop7/nest-elasticsearch-vue

ERROR [ExceptionHandler] The "path" argument must be one of type string, Buffer, or URL. Received type undefined

Opened this issue · 0 comments

Hi i'm getting this error in the main.ts file on this line

const configService = new ConfigService('.env');

The error:

[Nest] 86043 - 2022-02-02 17:29:13 ERROR [ExceptionHandler] The "path" argument must be one of type string, Buffer, or URL. Received type undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined
at Object.openSync (fs.js:432:10)
at Object.readFileSync (fs.js:342:35)
at new ConfigService (/Users/primaellebrun/apis/gazon-api/src/config/config.service.ts:8:38)
at Injector.instantiateClass (/Users/primaellebrun/apis/gazon-api/node_modules/@nestjs/core/injector/injector.js:291:19)
at callback (/Users/primaellebrun/apis/gazon-api/node_modules/@nestjs/core/injector/injector.js:43:41)
at Injector.resolveConstructorParams (/Users/primaellebrun/apis/gazon-api/node_modules/@nestjs/core/injector/injector.js:119:24)

Can you help?
Thanks