kantord / LibreLingo

🐢 🌎 📚 a community-owned language-learning platform
https://librelingo.app
GNU Affero General Public License v3.0
1.92k stars 209 forks source link

cant loaded courses from librelingo.app/dev #2620

Open jowodo opened 1 year ago

jowodo commented 1 year ago

Firstly, thanks for this amazing project!

Problem description The following courses listed at https://librelingo.app/dev/ fail to load:

They show instead:

500
Cannot find module './bangla-from-english/courseData.json'

Why is that? How can that be resolved and avoided?

jowodo commented 1 year ago

I could somehow replicate this error in the command line for the parsig-from-english course:

I hope this helps resolving this issue. Anyway, I had a look at the course and it is only a single skill and no more maintained. Maybe it can be excluded from the dev courses as is anyway doesn't seem to work. I suggest that when somebody is willing to fix, it can be added to again.

kantord commented 1 year ago

I could somehow replicate this error in the command line for the parsig-from-english course:

  • Setting up development environment as in https://librelingo.app/docs/index.html
  • download PAL-from-EN git clone https://github.com/LibreLingo/LibreLingo-PAL-from-EN
  • link course into courses directory and export:
cd LibreLinge/courses/
ln -s ../../LibreLinge-PAL-from-EN parsig-from-english # instead of ln -s ../../LibreLingo-PAL-from-EN/course parsig-from-english
yarn exportAllCourses # ERROER: can't find course.yaml
cd parsig-from-english 
yarn exportAllCourses # ERROR: can't find package.json 

I hope this helps resolving this issue. Anyway, I had a look at the course and it is only a single skill and no more maintained. Maybe it can be excluded from the dev courses as is anyway doesn't seem to work. I suggest that when somebody is willing to fix, it can be added to again.

regarding this, here the problem is that you need to run those commands in the root folder of the repository, without cding into /courses/ though I it's weird that you are also spelling it LibreLinge not LibreLingo :thinking: I'm not sure if this is a typo or what :thinking:

Also I think that those symbolic links should not be needed, right? I think that in the build process, at least the symbolic links should be correctly made but I'm not sure. For example Hungarian from English seems to have a working dev tools page but the course itself does not seem to be correctly deployed https://librelingo.app/course-tools-legacy/hungarian-from-spanish/

jowodo commented 1 year ago
  1. yes it's a typo. I meant LibreLingo
  2. indeed the symbolic links should not be problem. I just wanted to show how I purposely managed to produce a similar error. I see now, that the code snippet which I posted was not related to the problem. But that the error message is referring to the file ./apps/web/src/courses/parsig-from-english/courseData.json

I can confirm that the parsig-from-english is compiling/exporting successfully and can be used in the browser. I guess exporting is the step when the courseData.json file is created.

I think there are 3 options why the file is not found: