Fail to build MeshCat
zitongbai opened this issue · 7 comments
Hi there, I am new in Julia and today I ran into the following issue:
I was using the package TrajOptPlots
but is shows the error:
ERROR: LoadError: InitError:
main.min.js not found at [C:\Users\ziton\.julia\packages\MeshCat\GlCMx\assets\meshcat\dist\main.min.js.](file:///C:/Users/ziton/.julia/packages/MeshCat/GlCMx/assets/meshcat/dist/main.min.js.)
Please build MeshCat using `import Pkg; Pkg.build("MeshCat")`
Stacktrace:
[1] error(s::String)
@ Base [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)error.jl:33
[2] __init__()
@ MeshCat [C:\Users\ziton\.julia\packages\MeshCat\GlCMx\src\](file:///C:/Users/ziton/.julia/packages/MeshCat/GlCMx/src/)MeshCat.jl:126
[3] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)loading.jl:696
[4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)loading.jl:782
[5] _require(pkg::Base.PkgId)
@ Base [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)loading.jl:1020
[6] require(uuidkey::Base.PkgId)
@ Base [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)loading.jl:936
[7] require(into::Module, mod::Symbol)
@ Base [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)loading.jl:923
[8] include
@ [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)Base.jl:384 [inlined]
[9] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)loading.jl:1235
[10] top-level scope
@ none:1
[11] eval
@ [.\](https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/ziton/OneDrive/Resources/Control%20Theory/CMU%2016-745%20Optimal%20Control/lecture-notebooks/Lecture%2010/)boot.jl:360 [inlined]
...
[13] top-level scope
@ none:1
during initialization of module MeshCat
in expression starting at [C:\Users\ziton\.julia\packages\TrajOptPlots\KMLyb\src\TrajOptPlots.jl:1](file:///C:/Users/ziton/.julia/packages/TrajOptPlots/KMLyb/src/TrajOptPlots.jl:1)
then I import Pkg; Pkg.build("MeshCat")
as it suggests, but:
Building WebIO ──→ `C:\Users\ziton\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\0eef0765186f7452e52236fa42ca8c9b3c11c6e3\build.log`
Building Blink ──→ `C:\Users\ziton\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\08d0b679fd7caa49e2bca9214b131289e19808c0\build.log`
Building MeshCat → `C:\Users\ziton\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\ca4a1e45f5d2a2148c599804a6619da7708ede69\build.log`
ERROR: Error building `MeshCat`:
7-Zip 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26
Scanning the drive for archives:
1 file, 366785 bytes (359 KiB)
Extracting archive: C:\Users\ziton\AppData\Local\Temp\jl_HPO9dL\meshcat.zip
--
Path = C:\Users\ziton\AppData\Local\Temp\jl_HPO9dL\meshcat.zip
Type = zip
Physical Size = 366785
Comment = 2355f01a8310314c1d7fc7e51bd01006549beaae
ERROR: Cannot create symbolic link : �ͻ���û���������Ȩ�� : C:\Users\ziton\AppData\Local\Temp\jl_HPO9dL\meshcat-2355f01a8310314c1d7fc7e51bd01006549beaae\test\main.js
ERROR: Cannot create symbolic link : �ͻ���û���������Ȩ�� : C:\Users\ziton\AppData\Local\Temp\jl_HPO9dL\meshcat-2355f01a8310314c1d7fc7e51bd01006549beaae\test\main.min.js
Sub items Errors: 2
Archives with Errors: 1
Sub items Errors: 2
ERROR: LoadError: failed process: Process(`'D:\Users\ziton\AppData\Local\Programs\Julia-1.6.7\bin\..\libexec\7z.exe' x 'C:\Users\ziton\AppData\Local\Temp\jl_HPO9dL\meshcat.zip' -y '-oC:\Users\ziton\AppData\Local\Temp\jl_HPO9dL'`, ProcessExited(2)) [2]
Stacktrace:
[1] pipeline_error
@ .\process.jl:538 [inlined]
[2] run(::Cmd; wait::Bool)
@ Base .\process.jl:453
[3] run
@ .\process.jl:451 [inlined]
[4] (::var"#2#5")(download_dir::String)
@ Main C:\Users\ziton\.julia\packages\MeshCat\GlCMx\deps\build.jl:37
[5] mktempdir(fn::var"#2#5", parent::String; prefix::String)
@ Base.Filesystem .\file.jl:729
[6] mktempdir (repeats 2 times)
@ .\file.jl:727 [inlined]
[7] update_meshcat()
@ Main C:\Users\ziton\.julia\packages\MeshCat\GlCMx\deps\build.jl:34
[8] top-level scope
@ C:\Users\ziton\.julia\packages\MeshCat\GlCMx\deps\build.jl:45
[9] include(fname::String)
@ Base.MainInclude .\client.jl:444
[10] top-level scope
@ none:5
in expression starting at C:\Users\ziton\.julia\packages\MeshCat\GlCMx\deps\build.jl:45
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:55
[2] (::Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec})()
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1067
[3] withenv(::Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, ::Pair{String, String}, ::Vararg{Pair{String, B} where B, N} where N)
@ Base .\env.jl:161
[4] (::Pkg.Operations.var"#109#113"{String, Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec})()
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1565
[5] with_temp_env(fn::Pkg.Operations.var"#109#113"{String, Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.PackageSpec}, temp_env::String)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1467
[6] (::Pkg.Operations.var"#108#112"{Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String})(tmp::String)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1540
[7] mktempdir(fn::Pkg.Operations.var"#108#112"{Pkg.Operations.var"#82#87"{Bool, Pkg.Types.Context, String, Pkg.Types.PackageSpec}, Pkg.Types.Context, Pkg.Types.PackageSpec, String, Pkg.Types.Project, String}, parent::String; prefix::String)
@ Base.Filesystem .\file.jl:729
[8] mktempdir(fn::Function, parent::String) (repeats 2 times)
@ Base.Filesystem .\file.jl:727
[9] sandbox(fn::Function, ctx::Pkg.Types.Context, target::Pkg.Types.PackageSpec, target_path::String, sandbox_path::String, sandbox_project_override::Pkg.Types.Project)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1506
[10] build_versions(ctx::Pkg.Types.Context, uuids::Vector{Base.UUID}; verbose::Bool)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1048
[11] build(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, verbose::Bool)
@ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:929
[12] build(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; verbose::Bool, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:900
[13] build(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:80
[14] build(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:78
[15] #build#71
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
[16] build
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:76 [inlined]
[17] #build#70
@ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75 [inlined]
[18] build(pkg::String)
@ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:75
[19] top-level scope
@ REPL[4]:1
I don't have any idea how to solve it. Could you please help me?
I have the same problem with you and spent lots of time to solve it. I still can't fix it. what about you
I tried the way you told me and it worked. Thanks for your help. Really really thank you. Then I face another problem. When I run a code in VSCode with using TrajOptPlots and using MeshCat. I find a warning problem, have you ever come across it.
Warning: Module Rotations with build ID 214774140915801 is missing from the cache.
│ This may mean Rotations [6038ab10-8711-5258-84ad-4b1120ba62dc] does not support precompilation but is imported by a module that does.
└ @ Base loading.jl:1030
brother school BIT
hahahahha
谢谢小白哥的回复
@zitongbai is this still a problem for you or has it been resolved?
It has been resolved. Thanks