[00:45:34] Hello, the doc page for creating a Node.js-based Toolforge tool (https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js) says that the npm start command should start the web server. How can I do that if npm and even node are commands not found ? [01:05:46] Have you followed the full tutorial? [01:11:05] The beginning of the tutorial states "Make sure your node.js web server starts up properly when npm start is executed." [01:11:12] well near the beginning [01:12:23] so I can't really move forwards beyond that [01:12:55] also near the end it says "If you run into errors doing npm install, try LINK=g++ npm install", which to everyone's surprise, works no better with neither npm nor node installed [01:22:55] @Reedy if you're still there [01:23:24] what part of the full tutorial which would make node and npm available did you want me to follow ? [01:25:36] How do I install node and npm on the tools ? [01:25:48] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Create_a_node.js_web_server is talking about doing it locally [01:26:08] as per https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Create_a_node.js_web_server step 1 is then >SSH into your instance and become your tool. [01:28:49] I am become my tool [01:28:52] that's my point [01:29:14] that's where I try the command from [01:31:31] …? [01:33:40] How do I install node and npm on the tools ? [01:48:45] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Deploying_a_Vue_JS_Application_using_Node_JS_and_Vite Gouvernathor [01:50:25] That doesn't answer my question [01:50:26] How do I install node and npm on the tools ? [01:51:21] I need npm in order to build my (static) web app [02:04:29] You don't run most of the commands directly on the host [02:04:40] This is done purposefully [02:05:44] where do they run then ? inside a kub ? [02:06:11] I need to run kubernetes just to build my webapp using npm ? [02:10:23] Also, then why does it say in the first part of the tutorial "Make sure your node.js web server starts up properly when npm start is executed." ? How can I make sure of that if I'm not supposed to have access to npm ? [02:10:24] And if as you say that first part is meant to be done locally (which is not at all how I read it), then why does it say it's very important to get the port from an environment variable ? what does it care what I do locally ? [02:13:09] @Reedy [02:13:42] The expectation is you run it locally as you're developing it in whatever git repo [02:13:57] then why does it say it's very important to get the port from an environment variable ? what does it care what I do locally ? [02:14:54] because it's code that needs to go into what gets run? [02:15:10] that server.js is executed in the start command [02:15:40] how do I make sure that's what happens with the start command, if I can't run the start command ? [02:15:57] that would be a very vague meaning of "make sure"…… [02:15:59] how are you developing this site locally? [02:16:06] surely you have node running locally to do this? [02:16:11] yes of course [02:17:06] the commands are defined in the package.json, and you should be able run them locally in the same way? [02:17:14] but i don't plan on including that server.js on the git repo [02:18:09] https://wikitech.wikimedia.org/wiki/Help:Toolforge/Building_container_images/My_first_static_tool_using_Node.js [02:18:25] if that's really what it means then that page is really badly phrased : it gives you a file, then tells you where to put it on the server. and *then* to make sure of what happens when running npm start… [02:19:27] Again, the first section does not tell you to execute it on toolforge [02:20:06] yes it really does, so if that's not what it should be saying, then it should be rephrased [02:20:39] No it doesn't [02:20:45] tutorials are meant to be understood by people who don't know [02:20:46] The second section tells you to ssh in, the first doesn't [02:21:29] the first tells me to put a file at a precise location on the server, and then to "MAKE SURE" of what happens when npm start is run [02:21:43] It does not say to do anything on the server [02:22:00] yes it does, because it tells me to put a file at a precise location on the server, and then to "MAKE SURE" of what happens when npm start is run [02:22:11] No it doesn't [02:22:11] >Save the web server as $HOME/www/js/server.js. [02:22:26] That doesn't say on toolforge [02:22:48] If you look at the second section... [02:22:50] >SSH into your instance and become your tool. [02:22:50] >Clone your project into the $HOME/www/js directory. If the directory doesn't exist, feel free to create it using the mkdir command. Ensure that the project is cloned such that the package.json is in the www/js directory [02:23:09] Then it is telling you to, but the first section is *not* telling you to jump ahead and do stuff from the second [02:23:09] so, it clearly shows you that $HOME/www/js is a location on the server [02:23:15] No it doesn't [02:23:21] I have a $HOME on my local machine [02:23:25] I don't [02:23:50] You're almost certainly using a user account on whatever OS you're using [02:23:56] That will have a directory for that user [02:24:02] That, by convention, is $HOME [02:24:18] C:\Users\Username would be $HOME on windows [02:24:29] I think you're getting hung up on the wrong thing [02:24:35] that may be, but to someone who reads the tutorial that what it means [02:24:48] and what use is the first tutorial if it has no relationship to Toolforge and is not necessary to do the second tutorial ? [02:25:34] I'm not sure we define any tutorial as the "first" [02:25:35] https://wikitech.wikimedia.org/wiki/Help:Toolforge#Before_you_start [02:25:47] >To use Toolforge, you need: [02:25:51] >An understanding of Unix command line [02:26:16] I mean the one called "Create a node.js web server" [02:26:59] if it doesn't concern Toolforge (as it is only local), and if the second one "Deploying a Vue JS Application using Node JS and Vite" doesn't use whatever was done in the first tutorial [02:27:12] what's the point of the first part, "Create a node.js web server" ? [02:28:03] also if it's local, what does it care whether I put my files in $HOME/www/js or any other project directory ? that's absurd [02:28:06] I guess to introduce you to some basics that you might need [02:28:18] >The toolforge-node-app-base template repository is available on GitHub which has the above-mentioned setups already done and some further boilerplate code, which can be used to get started quickly. [02:28:54] I saw that, it's a mess with PHP mixed in for some reason and even some database setup [02:29:03] talk about boilerplate [02:29:14] (or starting quickly) [02:29:35] anyway, let's XY this thing [02:30:16] I have a repo that's ready to build a web application when doing npm install then npm run build (with some additional configuration parameters that I'll spare you) [02:30:37] once built, it's a directory with an index.html, static and ready to be served [02:30:45] how do I put that on Toolforge ? [02:32:13] You can basically follow https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js#Deploying_a_Vue_JS_Application_using_Node_JS_and_Vite [02:32:29] You can do the package.json change straight into your git repo [02:33:17] plus the part about express etc [02:34:42] I'm not using Vue nor Vite, I thought the first part was a generic tutorial and the second one was a more specific version. That's very discouraging and should really be explained more clearly in the page. (Not blaming you.) [02:35:22] I think the vue and vite part can be ignored [02:35:37] and in, the fact it says that [02:35:42] The docs can't cater for every use case, it's witten for a common use case [02:36:09] I think at least what it does say should be understandable [02:36:28] Hence why I also linked https://wikitech.wikimedia.org/wiki/Help:Toolforge/Building_container_images/My_first_static_tool_using_Node.js before [02:36:30] make a plan, so the reader knows if it's independent and alternative recipes [02:36:45] >Node.js can be used to deploy static websites. They just serve static files (html, js, css, ...) without running any specific language by themselves. [02:36:45] >This tutorial is designed to get a Node.js application installed onto Toolforge using the new build service, as quickly as possible. The application makes use of the serve Node.js webserver, but does not run any code, just serves static files. You could use something similar with other languages/buildpacks. [02:36:45] >You can also use this tutorial as a base for deploying more complex Node.js apps, for example using Express instead of Serve if you have to serve dynamic content instead of static files. [02:36:46] clarify that the first part is just homework to train your hand [02:37:02] I have no idea how you ended up on that page, or why you thought that was the one to necessarily follow [02:37:17] So whether the info you're suggesting should be there... [02:38:33] I have a tool running using flask and with a backend, I'm making a version with no backend so that should be objectively simpler. I followed the Flask tutorial in 2024 and it was orders of magnitude simpler than this [02:39:02] it's also longer, but still [02:41:48] It looks like https://wikitech.wikimedia.org/wiki/Help:Toolforge/Node.js hasn't substantially been edited for 3 years [02:42:08] also to answer your question from before : I have no particular interest in building container images, so there's no rational reason for me to read "Help:Toolforge/Building container images/My first static tool using Node.js" before "Help:Toolforge/Node.js" [02:43:21] what is "toolforge build start " supposed to do ? [02:44:54] initialise it all from the url to a git repo [02:45:12] what does initialize do ? [02:45:24] just clone ? [03:07:03] I tried to run the build from inside "toolforge webservice node20 shell" [03:07:08] it CRASHED [03:07:15] terminated (OOMKilled) [03:07:25] what can I do at this point [03:08:42] even if I ransacked my package.json to change the start script and add a hard dependency I don't need for my other deployments, the container wouldn't even be able to run the build process [03:24:53] Gouvernathor: some cloud team members will be coming online in ~4 hours. If you wouldn't mind offering paths to your git repo (or any other relevant info) that would help us help you [03:25:45] sure, thanks [03:25:46] https://codeberg.org/Gouvernathor/ParliamentDiagram-Angular [03:27:00] my end goal would be to have a ./update.sh, like there is on the parliamentdiagram tool, that just pulls the last version and deploys it [03:27:17] and the goal for now is to deploy on the parliamentdiagram-beta tool [03:27:56] given that I already deployed to my own domain name using gitlab pages (soon moving to Codeberg Pages) [03:28:51] (and final thing, it's expected that routing directly to a specific page that's not the root of the web app does not work, I'll fix it eventually) [07:48:12] Gouvernathor sent you a PR to add the little bits needed to run in toolforge as a buildservice image: https://codeberg.org/Gouvernathor/ParliamentDiagram-Angular/pulls/9 [07:48:26] (hmm, not around anymore :/, well, might see the MR) [11:01:45] @dcaro hi, thanks for your help, I wrote something back in the pull request if you have some time to review it, I would mainly need a documentation reference for how the build command works if that exists [19:04:35] Hi there, curious, what one could do to have https://toolsadmin.wikimedia.org/tools/id/wikiblame deleted, so one could maybe one day move the actual WikiBlame to it? [19:21:46] !log admin restarting osds one by one to pick up config changes [19:21:52] Logged the message at https://wikitech.wikimedia.org/wiki/Nova_Resource:Admin/SAL [19:22:23] Flominator: it's been more than 40 days hasn't it? I will try to see what's going on there; might not be today though. [19:28:01] Thanks, andrewbogott. I will look at it again in a month [19:37:04] T431241 is the relevant task [19:37:05] T431241: [disable-tools] Disabled Toolforge tool deletions not occurring - https://phabricator.wikimedia.org/T431241 [19:45:54] well well well, tool deletion workflow, my old nemesis returns