Error while running nestjs in production mode, cannot find module

I have found the issue, it was because of absolute path while importing the class.

import { EntityService } from '../shared/service-common'; //correct way

import { EntityService } from 'src/shared/service-common'; // wrong autoimport

To fix auto import, I have added this setting in VS Code

"typescript.preferences.importModuleSpecifier": "relative"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)