docs - understanding node and paths https://github.com/Ylianst/MeshCentral/issues/4379

silversword411 committed Aug 10, 2022 at 13:58 UTC 730bcb034ed56b2400f3dbaa7182bb0eb9a1f51a
1 file changed +31
docs/docs/meshcentral/debugging.md
+31
@@ -21,6 +21,37 @@ Make sure you understand how MeshCentral works with your browser using chrome de
21 "AgentWsCompression": false,
22 ```
23
24 +### Understanding node and paths
25 +
26 +Note that when running MeshCentral, you should always run like from the path that is parent to node_modules, so you do this:
27 +
28 +```
29 +cd C:\Program Files\Open Source\MeshCentral
30 +node node_modules\meshcentral
31 +```
32 +
33 +You do NOT do this:
34 +
35 +```
36 +cd C:\Program Files\Open Source\MeshCentral\node_modules\meshcentral
37 +node meshcentral
38 +```
39 +
40 +The problem with the second command is that NPM may install missing modules are the incorrect location.
41 +
42 +Also, in general I recommend not using the MeshCentral MSI Installer and just install manually unless you are very much scared of the command prompt. Anyone that knows about bit about the shell should install MeshCentral like this:
43 +
44 +```
45 +mkdir c:\meshcentral
46 +cd c:\meshcentral
47 +npm install meshcentral
48 +node node_modules\meshcentral
49 +(ctrl-c when done installing optional modules)
50 +node node_modules\meshcentral --install
51 +```
52 +
53 +This way, just have a lot more control over what is going on. Just my opinion, the MSI installer basically does the same thing and installs NodeJS for you.
54 +
55 ### Unable to update server
56
57 Generally the problem is that MeshCentral can't find the npm tool and so, can't run it to see if there is a new version. You can fix this by setting the path to npm in the config.json like this: