-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix LiveServer instructions in dev docs #1066
Comments
@clizbe, maybe we can reproduce your error together since the instructions and the LiveServer work fine for me. It might be that something is missing there or that some extra hints are missing. |
I tried going back to Julia and saying: |
@clizbe have you tried launching pwsh from the root of the TulipaEnergyModel.jl folder rather than the docs folder? if so, do you still have the same error? What I do is to run from there as in the documentation, and get no error, but maybe is not clear from there where the user need to launch the pwsh: |
@datejada, I think @clizbe is running from the root folder. @clizbe, you forgot one command in the description, but I think you ran it: Do you have Revise installed globally? Check with Does the following works: # new julia
julia> activate docs # or julia --project=docs
julia> using Revise # should have been installed globally
julia> using LiveServer
julia> servedocs(launch_browser=true)
# modify docs/src/index.md and save
# A bunch of Info and Warning messages, eventually HTMLWriter does its thing and page changes There will be Warning messages, but it should still work. The warning I see in your post are fine, but it is lacking the normal building stuff, which I guess is related to Revise (in the sense that Revise is not active, so there are no changes, so there is no build to be done). |
@abelsiqueira Checking Running So I tried: # close pwsh and start a new one for safety
pwsh> julia --project=docs
julia> using Revise
julia> using LiveServer
julia> servedocs(launch_browser=true) So I deleted the build folder and reran But if I change anything (I typed "boop" in the a paragraph and hit Ctrl+S) then I get this terminal error: |
@clizbe, I have no idea. I don't have those problems 😢 I can even change the docs, and it updates them without problem, unless I type something that causes an error. Even then, if I fix it, it shows the docs correctly rendered again. Anyway, I think the instructions in the documentation are correct. But if we figure out what is causing your problem, we can add some extra information to the docs for users who might encounter the same problem in the future. |
From the first error message, it looks like you have permission errors, which probably relates to the bigger issue. You shouldn't have to delete the Are you opening @gnawin, I vaguely remember you saying something about VSCode permissions, but maybe I'm "hallucinating." I'm not fluent in Windows permissions, so I'm not sure how to proceed. On Linux/Mac, I would check the permissions of the Julia folder ($HOME/.julia) and the juliaup folder ($HOME/.juliaup), and of the TulipaEnergyModel folder. Path might differ on Windows. |
So one thing I discovered is that Julia does not exist at: I tried launching Julia from the app, running as administrator. # I tried navigating to the Tulipa project docs folder... Dunno how this works with dev, branches, etc.
julia> pwd()
"C:\\Users\\clisbyle\\OneDrive - TNO\\GitHub\\TulipaEnergyModel.jl\\docs"
julia> using Revise
julia> using LiveServer
julia> servedocs(launch_browser=true)
ERROR: I didn't find a docs/ or docs/src/ folder.
# Okay, so I tried going to just the TEM project so it can find the subfolder...
julia> cd("C:\\Users\\clisbyle\\OneDrive - TNO\\GitHub\\TulipaEnergyModel.jl")
julia> servedocs(launch_browser=true)
ERROR: LoadError: ArgumentError: Package Documenter not found in current path.
# Makes sense, since it's looking at the Project.toml of TEM and not TEM/docs |
Also, when Julia launches, it tells me to run Looks like Julia is located here: I added this bin to my path, but doesn't help. I uninstalled and reinstalled both GitBash (it was having a weird error, but it remained after reinstall) and Julia - since my juliaup doesn't work. Still doesn't work. Also, my .julia folder still shows the last modified date as 3/3/2025 which I thought was weird if I just reinstalled it. |
To use LiveServer, you have to:
This means, you are in one folder (root) and activates the other (root/docs). In your post above, there is no Re:
Have you tried running from VSCode? Were you always running in adm mode? Please also reinstall juliaup. How are you installing it? And the |
I was running everything in VSCode (pwsh because gitbash is broken) until that last try in admin mode. That was in cmd. I'll try reinstalling juliaup. Thanks! |
I also checked my permissions on both the julia folder structure and the AppData folder (where Python lives but not Julia). And I have access everywhere. Haven't found anywhere yet that I don't have access. |
I'm not sure what it means to be in root. I think it just mean the default when I open the project, aka blah/blah/TulipaEnergyModel.jl? |
Could the problem be that my GitHub folder that holds all my local repos is on OneDrive - so sort of a cloud-sync version that maybe has access issues? 🤔 |
Yup I think the problem is that my GitHub folder is on the TNO OneDrive. So I can delete things, but VSCode (or whatever program) cannot. So it can't delete the |
@abelsiqueira Now it seems not to have any issues, but it doesn't open the browser. I tried fixing the warning about repolink, but it doesn't fix it (and it's just a warning anyway). |
Description
Following the instructions did not work for me.
I was eventually able to get LiveServer to generate the docs, but then they would not update with changes.
Validation and testing
No response
Motivation
No response
Target audience
Future devs
Can you help?
I can update the docs once I'm shown how to do it properly.
I tried multiple adjustments to fix it, but couldn't figure it out.
The text was updated successfully, but these errors were encountered: