SAFE-Stack / SAFE-template

dotnet CLI template for SAFE project
MIT License
282 stars 87 forks source link

Using safe stack with dotnet 6 #481

Closed EverybodyKurts closed 2 years ago

EverybodyKurts commented 2 years ago

Hey all,

I've been trying to get the safe stack template working with dotnet 6 but I've run into errors. The link below is a fresh install from the safe stack template, with upgrades from net5.0 to net6.0 and upgrades of the dotnet tools to their latest versions (Fable, Femto, etc).

https://github.com/EverybodyKurts/MySafe6App

There are 2 problems:

  1. Ionide can't seem to find the Fake modules in Build.fs or Helpers.fs. Rider doesn't experience the same problems.
  2. dotnet run runs but then errors out at the webpack compilation stage.
Screen Shot 2021-11-21 at 12 26 41 PM
olivercoad commented 2 years ago

Just tried testing it. Thanks for the simple repro repo.

  1. The Build.fs is fine for me. That said, Ionide can be a bit buggy sometimes. I find closing a .fs file a reopening often helps, or reloading the entire window. (And it's really inconsistent, sometimes reloading the entire VSCode window doesn't help but then closing and reopening just that file tab does)

  2. Can reproduce the same error. There was another issue that had a similar error message #483. Indeed, commenting out open Elmish.HRM in App.fs seems to make it work. I wonder if it's to do with an update to that package.

olivercoad commented 2 years ago

It works if you pin the version of Fable.Elmish.HMR to 4.1

EverybodyKurts commented 2 years ago
Screen Shot 2021-11-25 at 9 55 22 AM

No joy :(

I ran dotnet paket update and it still throws that error.

olivercoad commented 2 years ago

Hmm IDK then. If I clone your repo and pin Fable.Elmish.HMR to 4.1 and don't change anything else then it works fine. Did you do a dotnet paket install after changing paket.dependencies? Can you confirm that pinning the version actually worked by checking paket.lock?

olivercoad commented 2 years ago

Oh, in the screenshot the tab has white circle meaning it's bean edited but not saved. Maybe you just forgot to actually save the changes?

EverybodyKurts commented 2 years ago

I'm not a smart man

Oh yea, duh. That did it and now Webpack successfully compiled! Thank you for the help!

olivercoad commented 2 years ago

Haha no worries. Can't tell you how many times I've done that 😅