caoxiemeihao / nuxt-electron

Integrate Nuxt and Electron
MIT License
169 stars 18 forks source link

TypeError: Wr is not a constructor #42

Closed draugael closed 11 months ago

draugael commented 11 months ago

Hello I got an type error using nuxt-electron. I got this error when I try to used twurple :

  const chatClient = new ChatClient({
    authProvider: authBotProvider,
    channels: [read('streamerInfo')?.login as string]
  });

  chatClient.connect();
(node:36200) UnhandledPromiseRejectionWarning: TypeError: Wr is not a constructor
    at k_.connect (M:\codage\lion-bot-desktop\dist-electron\main.js:28:4580)
    at A_._tryConnect (M:\codage\lion-bot-desktop\dist-electron\main.js:28:3602)
    at A_.connect (M:\codage\lion-bot-desktop\dist-electron\main.js:28:1373)
    at j4.connect (M:\codage\lion-bot-desktop\dist-electron\main.js:31:7402)
    at _d.connect (M:\codage\lion-bot-desktop\dist-electron\main.js:31:33192)
    at lw (M:\codage\lion-bot-desktop\dist-electron\main.js:31:36802)
(Use `electron --trace-warnings ...` to show where the warning was created)

Any idea or clue to help solve this ?

caoxiemeihao commented 11 months ago

Can you provide a minimal reproduction repo?

draugael commented 11 months ago

I found the issue. I come to my authBotProvider initialization. I move my code to the nuxt plugin and I got more informations (with the good class name)