dodona-edu / dolos

:detective: Source code plagiarism detection
https://dolos.ugent.be
MIT License
251 stars 31 forks source link

Issue with development of Dolos Web #1571

Closed mikaelGusse closed 3 months ago

mikaelGusse commented 3 months ago

Which component(s) is your question about? Building Dolos Web

What is your question? Hello,

I am trying to try out some changes to Dolos Web component to facilitate integration into our services. However now I am hitting a roadblock with regards to building the software that I have yet to be able to resolve. There are two issues at play here.

  1. When I try to run the 'npm install' in the root directory I get a strange error like this
    
    npm ERR! code 1
    npm ERR! path /m/home/home2/22/gustafm4/unix/work/dolos/parsers
    npm ERR! command failed
    npm ERR! command sh -c (cd sql && tree-sitter generate)
    npm ERR! No such file or directory (os error 2)

npm ERR! A complete log of this run can be found in: npm ERR! /u/22/gustafm4/unix/.npm/_logs/2024-06-27T12_57_35_964Z-debug-0.log

I have tried doing this on a clean Linux install on an X86 machine as well as on my Arm Mac. Both have the same issue.

2. When I try to build the web component by commenting out the build step in the docker-compose.yml I get the following error

=> ERROR [web 7/7] RUN npm run build 0.6s


[web 7/7] RUN npm run build:
0.396
0.396 > @dodona/dolos-web@2.7.1 build
0.396 > vue-tsc --noEmit && vite build
0.396
0.498 0.498 /web/node_modules/vue-tsc/bin/vue-tsc.js:68 0.498 throw err; 0.498 ^ 0.498 Search string not found: "for (const existingRoot of buildInfoVersionMap.roots) {" 0.498 (Use node --trace-uncaught ... to show where the exception was thrown) 0.498 0.498 Node.js v22.2.0

failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1

This also happens on both machines.

At this point I am not sure how to proceed, do you have suggestions on what I should try to make this building work?

Thank you in advance!

rien commented 3 months ago

Hi! You need to clone the repository recursively so the submodules (tree-sitter parsers) are available.

If you've already cloned, you can run this command:

git submodule update --init --recursive

I can reproduce the second error, I'll search for a fix.