Open hotuns opened 2 years ago
when i use
import WOKCommands from 'wokcommands' ...... new WOKCommands(x,x)
got an error TypeError: wokcommands_1.default is not a constructor , and WOKCommands is undefined
TypeError: wokcommands_1.default is not a constructor
WOKCommands
undefined
in package.json : https://github.com/AlexzanderFlores/WOKCommands/blob/main/package.json#L4 main is dist/index.js but there is not ES Module : https://github.com/AlexzanderFlores/WOKCommands/blob/main/dist/index.js#L288-L289
package.json
dist/index.js
import WOKCommands,{Options} from 'wokcommands' type WokConstructor = { new(a:Client,b:Options): WOKCommands } const wok = require('wokcommands') as WokConstructor // is working new wok(client, {})
Can you tell me what the problem is?
when i use
got an error
TypeError: wokcommands_1.default is not a constructor
, andWOKCommands
isundefined
in
package.json
: https://github.com/AlexzanderFlores/WOKCommands/blob/main/package.json#L4 main isdist/index.js
but there is not ES Module : https://github.com/AlexzanderFlores/WOKCommands/blob/main/dist/index.js#L288-L289Strange solution
Can you tell me what the problem is?