Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.87k stars 527 forks source link

npm installation error #1936

Closed tlcarpenter closed 1 month ago

tlcarpenter commented 3 years ago

node.js v12.19.0, npm v6.14.8, windows 10 ent 1909 x64

C:\meshcentral>npm install meshcentral
npm WARN saveError ENOENT: no such file or directory, open 'C:\meshcentral\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\meshcentral\package.json'
npm WARN meshcentral No description
npm WARN meshcentral No repository field.
npm WARN meshcentral No README data
npm WARN meshcentral No license field.

+ meshcentral@0.6.71
added 138 packages from 139 contributors and audited 138 packages in 11.77s

13 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

C:\meshcentral>dir
 Volume in drive C has no label.
 Volume Serial Number is 6E7F-A352

 Directory of C:\meshcentral

10/30/2020  05:42 PM    <DIR>          .
10/30/2020  05:42 PM    <DIR>          ..
10/30/2020  05:42 PM    <DIR>          node_modules
10/30/2020  05:42 PM            40,183 package-lock.json
               1 File(s)         40,183 bytes
               3 Dir(s)  202,293,788,672 bytes free
Ylianst commented 3 years ago

The installation worked, you can ignore these messages. One day I need look into what I can do to clean that up, but if you do this:

node node_modules/meshcentral

It should complete the installation and run MeshCentral. Let me know if that works.

tlcarpenter commented 3 years ago

I only included part of the output from my attempt at installing MC2 using npm - I went as far as running

mkdir c:\meshcentral cd c:\meshcentral npm install meshcentral node node_modules\meshcentral

I just uninstalled MC2 then went through the same steps plus "node node_modules\meshcentral --install", which generates the output below.

P.S. After getting the output below I ran "node node_modules\meshcentral a second time and MC2 started up. I accessed the console and added a first user, logged out, then returned to the Command Prompt window and stopped MC2 with CTRL+C. I then tried re-running "node node_modules\meshcentral --install" but get the same output as below. I looked in "c:\meshcentral\node_module\meshcentral" but there isn't a "node_modules" directory there.

=================================================

C:>mkdir meshcentral

C:>cd meshcentral

C:\meshcentral>npm install meshcentral npm WARN saveError ENOENT: no such file or directory, open 'C:\meshcentral\package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open 'C:\meshcentral\package.json' npm WARN meshcentral No description npm WARN meshcentral No repository field. npm WARN meshcentral No README data npm WARN meshcentral No license field.

6 packages are looking for funding run npm fund for details

found 0 vulnerabilities

C:\meshcentral>node node_modules\meshcentral Installing archiver@4.0.2... Installing node-windows@0.1.14... Installing otplib@10.2.3... Module node-windows can't be loaded. Restart MeshCentral.

C:\meshcentral>node node_modules\meshcentral --install Installing MeshCentral as Windows Service... Error: Cannot find module 'C:\meshcentral\node_modules\meshcentral\node_modules\minimist' Require stack:

C:\meshcentral>

Stan-Stani commented 2 months ago

I just had this issue.

image

si458 commented 2 months ago

@Stan-Stani you have no issue Your issue happens from time to time, because it installs modules while node is running, and node can't find the modules until u restart it :)

si458 commented 1 month ago

closing as stale, if you still have this issue, please update to the latest version of meshcentral and try again if your still having issues then please reply back