[[ https://lingua-libre.toolforge.org/front-end/index.html | Index.html is served]] but returns the follwing error:
> Uncaught TypeError: The specifier “vue” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.
So I started discussion with ChatGPT / Copilot Chat:
>Q: Is npm installed on toolforge ? What if i need it ?
According to Copilote Chat, Toolforge is mostly for python so npm is not really available nor is `npm install` [[ https://gitlab.wikimedia.org/repos/wikimedia-france/lingua-libre/lingua-libre/-/blob/main/front-end/package.json | front-end/package.json ]]. The way is to use Gitlab pireline (or job) to `npm run build:prod` for a `./dist/`.
> Q: On https://lingua-libre.toolforge.org's server, my ~/www/python/uwsgi.ini contains :
> ```
> [uwsgi]
> check-static = /data/project/lingua-libre/www/python/src
> ```
> My https://lingua-libre.toolforge.org/front-end/index.html containing :
> ```html
> <!DOCTYPE html>
> <html lang="en">
> <head>
> <meta charset="UTF-8">
> <link rel="icon" href="/favicon.ico">
> <meta name="viewport" content="width=device-width, initial-scale=1.0">
> <title>Lingua Libre</title>
> </head>
> <body>
> <div id="app"></div>
> <script type="module" src="./src/main.js"></script>
> </body>
> </html>
> ```
> is served as a static html, the JS doesn't load, and the browser console returns le following error :
> Uncaught TypeError: The specifier “vue” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.
> What should I do to make the js work ?
> Q: My repository is at https://gitlab.wikimedia.org/repos/wikimedia-france/lingua-libre/lingua-libre/ , how to automatize the build process and deployment toward https://lingua-libre.toolforge.org/ ?
Copilote chat suggests to add a "CI/CD pipeline" yml in order to :
- builds the frontend on every commit.
- deploy to Toolforge via SSH
It seems doable in 1~3hours depending on bugs. Is someone interested to take this on ? Seems an interesting learning for junior developers. Else I take this turn myself and you enjoy. 👍🏼