Skip to content

Commit dad6801

Browse files
committed
fix required ESM
1 parent fb9f46e commit dad6801

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/utils/auth/m2m.service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
// eslint-disable-next-line @typescript-eslint/no-require-imports
2-
const m2mAuth = require('tc-core-library-js').auth.m2m;
1+
import { createRequire } from 'node:module';
32
import { M2mConfig } from '../../config/m2m.config';
43

4+
const require = createRequire(import.meta.url);
5+
const m2mAuth = require('tc-core-library-js').auth.m2m;
6+
57
/**
68
* Service to get M2M token with auth0 configs
79
*/

0 commit comments

Comments
 (0)