hexparrot / mineos-node

node.js implementation of mineos minecraft management
GNU General Public License v3.0
334 stars 170 forks source link

cannot find module diskusage.node #492

Closed SomeFixItDude closed 2 years ago

SomeFixItDude commented 2 years ago

Hi I recently ran the update webui script and I cannot get mineos running again. I re-ran it and pasted the output here.

root@tyche:/usr/games/minecraft# ./update_webui.sh
Script execution started on: Thu 07 Jul 2022 05:03:20 PM EDT
Updating mineos-node repository...OK
Pulling master branch...From https://github.com/hexparrot/mineos-node
 * branch            master     -> FETCH_HEAD
OK
OK
Setting node javascript files to executable...OK
Script execution ended on: Thu 07 Jul 2022 05:03:25 PM EDT
root@tyche:/usr/games/minecraft# supervisorctl start mineos
mineos: ERROR (spawn error)
root@tyche:/usr/games/minecraft# /usr/bin/node webui.js
(node:1210) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1210) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/games/minecraft/node_modules/node-getopt/package.json' of './lib'. Please either fix that or report it to the module author
first mineos configuration identified as /etc/mineos.conf
using base_directory:  /var/games/minecraft
Uncaught Exception: Error: Cannot find module './build/Release/diskusage.node'
Require stack:
- /usr/games/minecraft/node_modules/diskusage/index.js
- /usr/games/minecraft/server.js
- /usr/games/minecraft/webui.js
Error: Cannot find module './build/Release/diskusage.node'
Require stack:
- /usr/games/minecraft/node_modules/diskusage/index.js
- /usr/games/minecraft/server.js
- /usr/games/minecraft/webui.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:946:15)
    at Module._load (node:internal/modules/cjs/loader:787:27)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/games/minecraft/node_modules/diskusage/index.js:1:14)
    at Module._compile (node:internal/modules/cjs/loader:1112:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:834:12)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
About to exit with code 1
root@tyche:/usr/games/minecraft# node --version
v18.4.0
root@tyche:/usr/games/minecraft# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Seems I am missing diskusage.node?

Any help greatly appreciated.

SomeFixItDude commented 2 years ago

Also tried the hard reset:

# cd /usr/games/minecraft
# git fetch
# git reset --hard origin/master
# git checkout master
# rm -rf ./node_modules
# npm install --unsafe-perm

When I get to the npm install it fails, the debug log shows:

1986 info run diskusage@1.1.3 install node_modules/diskusage node-gyp rebuild
1987 info run posix@4.2.0 install node_modules/posix node-gyp rebuild
1988 info run userid@1.0.0-beta.9 install node_modules/userid npm run build
1989 info run userid@1.0.0-beta.9 install { code: 243, signal: null }
1990 timing reify:rollback:createSparse Completed in 1330ms
1991 timing reify:rollback:retireShallow Completed in 0ms
1992 timing command:install Completed in 26003ms
1993 verbose stack Error: command failed
1993 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
1993 verbose stack     at ChildProcess.emit (node:events:537:28)
1993 verbose stack     at maybeClose (node:internal/child_process:1091:16)
1993 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
1994 verbose pkgid userid@1.0.0-beta.9
1995 verbose cwd /usr/games/minecraft
1996 verbose Linux 4.19.0-21-amd64
1997 verbose node v18.4.0
1998 verbose npm  v8.12.1
1999 error code 243
2000 error path /usr/games/minecraft/node_modules/userid
2001 error command failed
2002 error command sh -c npm run build
2003 error
2004 verbose exit 243
2005 timing npm Completed in 26145ms
2006 verbose unfinished npm timer reify 1657228923280
2007 verbose unfinished npm timer reify:build 1657228947326
2008 verbose unfinished npm timer build 1657228947327
2009 verbose unfinished npm timer build:deps 1657228947328
2010 verbose unfinished npm timer build:run:install 1657228947402
2011 verbose unfinished npm timer build:run:install:node_modules/diskusage 1657228947403
2012 verbose unfinished npm timer build:run:install:node_modules/posix 1657228947423
2013 verbose unfinished npm timer build:run:install:node_modules/userid 1657228947437
2014 verbose code 243
hexparrot commented 2 years ago

What happens when you try to build the missing/failed npm packages manually?

npm install userid
npm install diskusage
SomeFixItDude commented 2 years ago

I got the same error when trying to manually install them as well. I'll close this issue. I have put down this for the time being. ty for looking though

flareofghast commented 2 years ago

I’m not sure that Node 18 works. I think you may require Node 14.

Sent from my iPhone

On 8 Jul 2022, at 6:56 am, SomeFixItDude @.***> wrote:

 Also tried the hard reset:

cd /usr/games/minecraft

git fetch

git reset --hard origin/master

git checkout master

rm -rf ./node_modules

npm install --unsafe-perm

When I get to the npm install it fails, the debug log shows:

1986 info run @. install node_modules/diskusage node-gyp rebuild 1987 info run @. install node_modules/posix node-gyp rebuild 1988 info run @. install node_modules/userid npm run build 1989 info run @. install { code: 243, signal: null } 1990 timing reify:rollback:createSparse Completed in 1330ms 1991 timing reify:rollback:retireShallow Completed in 0ms 1992 timing command:install Completed in 26003ms 1993 verbose stack Error: command failed 1993 verbose stack at ChildProcess. @./promise-spawn/lib/index.js:63:27) 1993 verbose stack at ChildProcess.emit (node:events:537:28) 1993 verbose stack at maybeClose (node:internal/child_process:1091:16) 1993 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:302:5) 1994 verbose pkgid @. 1995 verbose cwd /usr/games/minecraft 1996 verbose Linux 4.19.0-21-amd64 1997 verbose node v18.4.0 1998 verbose npm v8.12.1 1999 error code 243 2000 error path /usr/games/minecraft/node_modules/userid 2001 error command failed 2002 error command sh -c npm run build 2003 error 2004 verbose exit 243 2005 timing npm Completed in 26145ms 2006 verbose unfinished npm timer reify 1657228923280 2007 verbose unfinished npm timer reify:build 1657228947326 2008 verbose unfinished npm timer build 1657228947327 2009 verbose unfinished npm timer build:deps 1657228947328 2010 verbose unfinished npm timer build:run:install 1657228947402 2011 verbose unfinished npm timer build:run:install:node_modules/diskusage 1657228947403 2012 verbose unfinished npm timer build:run:install:node_modules/posix 1657228947423 2013 verbose unfinished npm timer build:run:install:node_modules/userid 1657228947437 2014 verbose code 243 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.