Import class with path alias failed
Closed this issue · 1 comments
ch4rlesyeo commented
Hi, first of all thanks for creating such awesome library. I'm in the middle of trying OvernightJS and having problem trying to import a class into my controller, got an error saying :
Somehow when I changed the import to '../models/company' and it works. Also importing '@Models/firebase' works fine too.
I'm quite new to typescript, sry if this question isn't related to OvernightJS itself.
Thanks and appreciate a lot!
ch4rlesyeo commented
The issue solved when added tsconfig-paths into run scripts :
"dev": "nodemon --watch 'src/**/*.ts' --ignore 'src/**/*.spec.ts' --exec 'ts-node' -r tsconfig-paths/register src/index.ts"