nodegui/svelte-nodegui-starter

Type error in starter template

bihanviranga opened this issue · 3 comments

When I run the starter template I get a type error: TS2345: Argument of type 'typeof SvelteComponentDev' is not assignable to parameter of type 'typeof SvelteComponent'.

Steps I followed:

  • Clone this repo.
  • yarn
  • yarn dev

Complete error message:
image

What I tried:

  • Tried casting: svelteNodeGUI(App as SvelteComponent, {}); Did not work.

Any ideas how to fix this? I could not find anything relevant in the FAQ or previous issues.
Thank you for the awesome work you are doing.

I’m guessing some subdependency has changed.

Could you try removing all the ^ from the version ranges in package.json, deleting the package-lock.json, removing node_modules and rerunning yarn install?

Note also that I can’t guarantee that it works with yarn at all! You may have more luck with npm.

Thank you for the response. I got it to work (sort of, GUI is broken) by following your advice.

I'll list what I did here in case it helps someone else.

  • Deleted node_modules and yarn.lock
  • Changed package.json and removed all ^ from version ranges.
  • npm install (previously I was using yarn)
  • npm run dev
  • At this point I got another error: TS2307: Cannot find module '@nodegui/svelte-nodegui' or its corresponding type declarations..
    I followed the advice in this response and changed the version in package.json and ran npm install again.

It doesn't show any errors now. The app loads fine. But the GUI is broken as mentioned in #4

Since my original issue is resolved, I'll close this issue. Thank you very much for the help!