JerryI / wolfram-js-frontend

Dynamic Notebook Environment for Wolfram Language written in Javascript
https://jerryi.github.io/wljs-docs/
GNU General Public License v3.0
295 stars 13 forks source link

Issue: cannot run start.wls due to missing packages. Also, HTTPHandler repos are mixed up? #299

Open AbsoluteVacuum opened 22 hours ago

AbsoluteVacuum commented 22 hours ago

After cloning the repository and moving to its folder, I ran wolframscript -f start.wls host 0.0.0.0 http 8090 ws 8091 ws2 8092 docs 8095 To obtain the following:

Get::noopen: Cannot open KirillBelov`CSockets`.
Get::noopen: Cannot open KirillBelov`Objects`.
Get::noopen: Cannot open KirillBelov`Internal`.

and more lines.


After installing all the packages manually, by running the same line I obtained a different issue:

Get::noopen: Cannot open KirillBelov`HTTPHandler`Extensions`.

I tried launching wolframscript and loading the packane manually. However,

 <<KirillBelov`HTTPHandler`Extensions`
Get::noopen: Cannot open KirillBelov`HTTPHandler`Extensions`.

even though the package was installed:

In[12]:= PacletFind["KirillBelov/HTTPHandler"][[1]][All]

Out[12]= {Name -> KirillBelov/HTTPHandler, Version -> 1.0.12, WolframVersion -> 13+, Qualifier -> ,
>    SystemID -> All, Description -> HTTP Handler, Creator -> Kirill Belov, PublisherID -> KirillBelov,
>    Context -> {KirillBelov`HTTPHandler`, KirillBelov`HTTPHandler`Serialization`}, Loading -> Manual,
>    AutoUpdating -> False, IsPrereleaseVersion -> False, Enabled -> True,
>    Location -> (*omitted*)\AppData\Roaming\Wolfram\Paclets\Repository\KirillBelov__HTTPHandler-1.0.12}

By examining the PacletInfo.wl, I found that Extensions.wl was not added in the "Extensions" -> { (*...*) "Context" }.

I added it manually and relaunched wolframscript:

In[9]:= <<KirillBelov`HTTPHandler`Extensions`

Get::noopen: Cannot open (*omitted*)\AppData\Roaming\Wolfram\Paclets\Repository\KirillBelov__HTTPHandler-1.0.
     12\Kernel\MIMETypes.wl.

This file is simply not there in the folder.

I found it in https://github.com/JerryI/HTTPHandler, but this repository seemingly houses version 1.0.0. The GitHub link on Wolfram Paclet Repo points to https://github.com/KirillBelovTest/HTTP, which has different filenames.

JerryI commented 22 hours ago

Yep. The main branches of those packages differs, since their API is not stable. We use old forks and LPM package manager to install them locally to the folder of wljs (which normally happens on the first start) to avoid any conflicts.

Please check if LPM.wl file is in the root folder of the project and for a "clean" experiment, could, you please remove the files and folders in the root directory of wljs

and start again (it would be interesting to have a look at this first log it will produce)

You don't have to remove or do something with packages you installed globally. WL gives the priority to the local ones.

AbsoluteVacuum commented 22 hours ago

Okay, I removed everything and relaunched the file. This time it seems to behave more properly, it seemingly installed a few packages and launched something, asking to Open http://127.0.0.1:20560 in your browser However, when I try to do it, the page just loads infinitely.

JerryI commented 22 hours ago

We probably need a log file and also your OS details, otherwise it is hard to tell. Sometimes it comes to an issue with permissions and etc.

You can share it privately if you wish on my email krikus.ms@gmail.com

AbsoluteVacuum commented 21 hours ago

Thanks, I sent it.

JerryI commented 13 minutes ago

We have updated the repository of LPM, which removes automatically conflicting packages. Now it should work better

commit