-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
"one-time-activation-code": "^1.0.16"
Having issue importing library this way in typescript:
import OneTimeActivationCode from 'one-time-activation-code'
const otac = new OneTimeActivationCode({
expiresAfter: Number(process.env.ACTIVATION_CODE_TIMEOUT || 300),
attemptsChance: 3,
encodeCode: true,
})
Error:
const otac = new OneTimeActivationCode({
^
TypeError: one_time_activation_code_1.default is not a constructor
But there are no problems importing it this way:
const OneTimeActivationCode = require('one-time-activation-code')
tsconfig:
"compilerOptions": {
"lib": [
"ES6"
],
"module": "CommonJS",
"moduleResolution": "Node",
"outDir": "build",
"sourceMap": true,
"strict": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
},
Metadata
Metadata
Assignees
Labels
No labels