Skip to content
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

Building docs on windows #171

Open
oameye opened this issue Aug 26, 2024 · 3 comments
Open

Building docs on windows #171

oameye opened this issue Aug 26, 2024 · 3 comments

Comments

@oameye
Copy link
Contributor

oameye commented Aug 26, 2024

When building the docs on windows it can't install npm. The same code however works on linux ubuntu. Is there a way to resolve it?

CI = get(ENV, "CI", nothing) == "true" || get(ENV, "GITHUB_TOKEN", nothing) !== nothing

using Sgmam
using Documenter
using DocumenterVitepress
using DocumenterCitations

DocMeta.setdocmeta!(Sgmam, :DocTestSetup, :(using Sgmam); recursive=true)

# using Downloads: Downloads
# Downloads.download(
#   "https://raw.githubusercontent.com/oameye/sgmam.jl/master/README.md",
#   joinpath(@__DIR__, "src/index.md"),
# )

bib = CitationBibliography(
  joinpath(@__DIR__, "src", "refs.bib");
  style=:numeric,  # default
)

makedocs(;
  modules=[Sgmam],
  repo=Remotes.GitHub("oameye", "Sgmam.jl"),
  authors="Orjan Ameye <[email protected]>",
  sitename="Sgmam.jl",
  format=DocumenterVitepress.MarkdownVitepress(;
    repo="github.com/oameye/Sgmam.jl", devbranch="master", devurl="dev"
  ),
  pages=["Home" => "index.md", "API" => "API.md"],
  plugins=[bib],
)

if CI
  deploydocs(;
    repo="github.com/oameye/Sgmam.jl",
    devbranch="master",
    target="build",
    branch="gh-pages",
    push_preview=true,
  )
end
 Warning: Documenter could not auto-detect the building environment. Skipping deployment.
└ @ Documenter C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\deployconfig.jl:76
┌ Warning: DocumenterVitepress: Did not detect `docs/src/.vitepress/config.mts` file.  Substituting in the default file.
└ @ DocumenterVitepress C:\Users\orjan\.julia\packages\DocumenterVitepress\tIz9X\src\vitepress_config.jl:40
┌ Warning: DocumenterVitepress: No logo.png file found in `docs/src/assets`.  Skipping logo replacement.
└ @ DocumenterVitepress C:\Users\orjan\.julia\packages\DocumenterVitepress\tIz9X\src\vitepress_config.jl:111
┌ Warning: DocumenterVitepress: No favicon.ico file found in `docs/src/assets`.  Skipping favicon replacement.
└ @ DocumenterVitepress C:\Users\orjan\.julia\packages\DocumenterVitepress\tIz9X\src\vitepress_config.jl:122
[ Info: DocumenterVitepress: building Vitepress site.
ERROR: LoadError: IOError: could not spawn `'C:\Users\orjan\.julia\artifacts\e0f2606e735e0e006f7c94fbc32e5c199387f894\bin\npm' install`: no such file or directory (ENOENT)
Stacktrace:
  [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Union{RawFD, Base.Libc.WindowsRawSocket, IO}})
    @ Base .\process.jl:128
  [2] #784
    @ .\process.jl:139 [inlined]
  [3] setup_stdios(f::Base.var"#784#785"{Cmd}, stdios::Vector{Union{RawFD, Base.Libc.WindowsRawSocket, IO}})
    @ Base .\process.jl:223
  [4] _spawn
    @ .\process.jl:138 [inlined]
  [5] run(::Cmd; wait::Bool)
    @ Base .\process.jl:479
  [6] run
    @ .\process.jl:477 [inlined]
  [7] (::DocumenterVitepress.var"#15#18"{MarkdownVitepress, String})(::String)
    @ DocumenterVitepress C:\Users\orjan\.julia\packages\DocumenterVitepress\tIz9X\src\writer.jl:194
  [8] (::JLLWrappers.var"#2#3"{DocumenterVitepress.var"#15#18"{MarkdownVitepress, String}, String})()
    @ JLLWrappers C:\Users\orjan\.julia\packages\JLLWrappers\pG9bm\src\runtime.jl:49
  [9] withenv(f::JLLWrappers.var"#2#3"{DocumenterVitepress.var"#15#18"{MarkdownVitepress, String}, String}, keyvals::Pair{String, String})       
    @ Base .\env.jl:257
 [10] withenv_executable_wrapper(f::Function, executable_path::String, PATH::String, LIBPATH::String, adjust_PATH::Bool, adjust_LIBPATH::Bool)   
    @ JLLWrappers C:\Users\orjan\.julia\packages\JLLWrappers\pG9bm\src\runtime.jl:48
 [11] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base .\essentials.jl:892
 [12] invokelatest(::Any, ::Any, ::Vararg{Any})
    @ Base .\essentials.jl:889
 [13] node(f::Function; adjust_PATH::Bool, adjust_LIBPATH::Bool)
    @ NodeJS_20_jll C:\Users\orjan\.julia\packages\JLLWrappers\pG9bm\src\products\executable_generators.jl:22
 [14] #14
    @ C:\Users\orjan\.julia\packages\DocumenterVitepress\tIz9X\src\writer.jl:188 [inlined]
 [15] cd(f::DocumenterVitepress.var"#14#17"{MarkdownVitepress, String}, dir::String)
    @ Base.Filesystem .\file.jl:101
 [16] render(doc::Documenter.Document, settings::MarkdownVitepress)
    @ DocumenterVitepress C:\Users\orjan\.julia\packages\DocumenterVitepress\tIz9X\src\writer.jl:183
 [17] runner(::Type{DocumenterVitepress.MarkdownFormat}, fmt::MarkdownVitepress, doc::Documenter.Document)
    @ DocumenterVitepress C:\Users\orjan\.julia\packages\DocumenterVitepress\tIz9X\src\DocumenterVitepress.jl:28
 [18] dispatch(::Type{Documenter.FormatSelector}, ::MarkdownVitepress, ::Vararg{Any})
    @ Documenter.Selectors C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\utilities\Selectors.jl:170
 [19] render(doc::Documenter.Document)
    @ Documenter C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\writers.jl:45
 [20] runner(::Type{Documenter.Builder.RenderDocument}, doc::Documenter.Document)
    @ Documenter C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\builder_pipeline.jl:258
 [21] dispatch(::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Document)
    @ Documenter.Selectors C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\utilities\Selectors.jl:170
 [22] #86
    @ C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\makedocs.jl:248 [inlined]
 [23] withenv(::Documenter.var"#86#88"{Documenter.Document}, ::Pair{String, Nothing}, ::Vararg{Pair{String, Nothing}})
    @ Base .\env.jl:257
 [24] #85
    @ C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\makedocs.jl:247 [inlined]
 [25] cd(f::Documenter.var"#85#87"{Documenter.Document}, dir::String)
    @ Base.Filesystem .\file.jl:101
 [26] #makedocs#84
    @ C:\Users\orjan\.julia\packages\Documenter\qoyeC\src\makedocs.jl:247 [inlined]
 [27] top-level scope
    @ E:\Sgmam.jl\docs\make.jl:21
 [28] include(fname::String)
    @ Base.MainInclude .\client.jl:489
 [29] top-level scope
    @ REPL[4]:1
in expression starting at E:\Sgmam.jl\docs\make.jl:21
versioninfo()
Julia Version 1.10.4
Commit 48d4fd4843 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × AMD Ryzen 5 5600X 6-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)
Environment:
  JULIA_PKG_PRESERVE_TIERED_INSTALLED = true
@MinecraftEarthVillage

This comment has been minimized.

@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
@kapple19
Copy link

I have the same problem. I can't find mention of it not working anywhere on Windows.

@MinecraftEarthVillage
Copy link

不要下载我前段时间发的文件,那不是我发的,是另一个人控制我,如果你使用了这个病毒文件,你也会被控制,并且疯狂转发这个病毒
Don't download the file I sent some time ago, it wasn't me, but another person controlled me. If you use this virus file, you will also be controlled and forward this virus crazily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@kapple19 @oameye @MinecraftEarthVillage and others