-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How To Start a Saturn Project #349
Comments
Are you able to run this? dotnet --list-sdks |
Yes:
|
Seems that Fake is not being installed. It appears that fake-cli was removed from dotnet-tools.json in the Saturn template in this commit: SaturnFramework/Saturn.Template@9e46b28 and therefore not being installed as part of
Does it need to be installed some other way? |
I think it does not need to be installed. Previously it was used to facilitate the building of the project. I thought that it would be possible to run this template by: # after installing the template and instantiating a sample project
# ...
dotnet run --project ./src/SaturnSample/ But it's throwing a bunch of errors. |
Hum, those errors are related to the ❯ dotnet run --project ./src/SaturnSample/
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(4,14): error FS0039: The namespace 'GiraffeViewEngine' is not defined. [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(10,7): error FS0039: The value or constructor 'div' is not defined. Maybe you want one of the following: dict Edit [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(40,18): error FS0039: The value or constructor 'section' is not defined. Maybe you want one of the following: Action [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(45,7): error FS0039: The value or constructor 'div' is not defined. Maybe you want one of the following: dict Edit [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(57,18): error FS0039: The value or constructor 'section' is not defined. Maybe you want one of the following: Action [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(61,7): error FS0039: The value or constructor 'div' is not defined. Maybe you want one of the following: dict Edit [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(67,7): error FS0039: The value or constructor 'div' is not defined. Maybe you want one of the following: dict Edit [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(81,7): error FS0039: The value or constructor 'div' is not defined. Maybe you want one of the following: dict Edit [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(91,7): error FS0039: The value or constructor 'div' is not defined. Maybe you want one of the following: dict Edit [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksViews.fs(102,18): error FS0039: The value or constructor 'section' is not defined. Maybe you want one of the following: Action [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksRepository.fs(6,27): error FS0039: The namespace 'ContextInsensitive' is not defined. [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
~/SaturnSample/src/SaturnSample/Books/BooksController.fs(4,27): error FS0039: The namespace 'ContextInsensitive' is not defined. [~/SaturnSample/src/SaturnSample/SaturnSample.fsproj]
The build failed. Fix the build errors and run again. |
Yes, I'm getting the same errors when using dotnet run. |
@scorelocity try doing this:
After those changes, try the dotnet run again. |
Yes, that seemed to work. Since this workaround didn't match any docs or README, I wonder if this should be an issue in the Saturn.Template project (I opened it here because I did not know what the problem was). It's also not clear if Saturn is intentionally moving away from Fake. Anyways, @vgajo , thank you for your help. |
I created a PR to fix the template in We need to work later in the docs. Please keep this issue open, while we don't have a PR to fix it (you can create it if you want). |
I created this PR ^ to update the |
I created this PR: #364 as a part of this discussion. It changes GiraffeViewEngine to Giraffe.ViewEngine. |
I am having issues opening the template project as well. I got it to run, but am wondering why Ionide can't open the project to give me type inference. Right now I am trying to open it in Visual Studio, and I see that it is complaining that |
I've edited the solution file by hand to fix this. I wonder if there is a way to delete and regenerate the solution automatically? |
The main page loads, but going to: http://localhost:8085/books Gives the following error:
I am not familiar with databases so I have no idea what to do here. |
@mrakgr What command did you use to create the project locally? |
I followed the stuff in here: https://saturnframework.org/tutorials/how-to-start.html But |
Got it, I think the instructions there are a bit wrong. Maybe those instructions work well: I'm going to test it in my local environment soon. |
Do I need to install anything special for SQLite perhaps? |
What is the output of the |
Nothing as far I can see. I forgot whether something has happened the first time around? I'll try a fresh template. |
I tried it, and the output of the migration is the same as above. |
Btw, |
Hum, weird, it was supposed to create the database with this command. There is something wrong with it then. This CLI command is related to this project AFAIK: https://github.com/SaturnFramework/Saturn.Cli. |
Wait, I get it.
I didn't think this would be a problem, but it seems the directory needs to be exactly |
It's pretty weird, for sure. And it's also curious that it does not throw any error when you run the command outside the expected directory. |
[<EntryPoint>]
let main argv =
let assembly = Assembly.GetExecutingAssembly()
use db = new SqliteConnection "DataSource=src/Saturn-sample/database.sqlite" I figured out how to make the database migration work on the project inside the I review, though I apologized for failing to follow the instructions exactly, it is clearly that the template is broken. Maybe it is converting the |
Followed instructions on How To Start page exactly and when I run:
dotnet fake build -t run
I get the following error:
Could not execute because the specified command or file was not found.
Am I missing a global install of Fake or is something wrong with the local tools install, or something else?
Originally posted by @scorelocity in #348
The text was updated successfully, but these errors were encountered: