CentOS 8: Interface loads but is not processed

I’m migrating from CentOS 7 to 8 (unfortuantly the installer killed my LVM so I’m starting over) and I have eveything installed (adapted where appropriate).

CentOS 8 has NodeJS 10.x available as a module
I built and installed rdiff-backup and the two python dependencies from the latest Fedora RPMs.

Everything else was by the book.

So after login the “site” loads… ALL OF IT and none of the “variables” are processed.

Any ideas?

Thanks,
Richard

Best guess is that not all the npm modules built properly.

Try running the reset_webui.js script and provide the output to us and maybe it’ll identify outright what went wrong.

Issues are also often put into /var/log/mineos.log

In /var/log/mineos.log:

Script execution started on: Thu Feb 27 19:11:04 CST 2020
Updating mineos-node repository...OK
Pulling master branch...Already up to date.
OK
Updating npm dependencies...
> posix@4.1.2 install /usr/games/minecraft/node_modules/posix
> node-gyp rebuild

FAILED

but then nothing obvious except:

make: Leaving directory '/usr/games/minecraft/node_modules/userid/build'
added 566 packages from 428 contributors and audited 1297 packages in 6.464s
found 2 vulnerabilities (1 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details
OK

In ~/.npm/_logs/2020-02-28T19_00_45_253Z-debug.log

98 verbose stack Error: posix@4.1.2 install: `node-gyp rebuild`
98 verbose stack Exit status 1
98 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
98 verbose stack     at EventEmitter.emit (events.js:198:13)
98 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
98 verbose stack     at ChildProcess.emit (events.js:198:13)
98 verbose stack     at maybeClose (internal/child_process.js:982:16)
98 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

Well, this is definitely the error needing addressing. MineOS’ webui depends on this particular package, so we need to find out what it will take to get it to compile properly.

I just looked up posix and it appears it was updated fairly recently to 4.2.0. Perhaps this might also make it have greater compatibility across different node versions. So let’s try installing the more recent version:

cd /usr/games/minecraft
which node
npm install posix

What’s the full output?

And while you do say you’re aiming for using node 10, can you confirm it’s node 10 that’s actually being used? (part of the output above)

$ which node
/usr/bin/node

$ npm install posix
npm WARN checkPermissions Missing write access to /usr/games/minecraft/node_modules/posix/node_modules/nan
npm WARN checkPermissions Missing write access to /usr/games/minecraft/node_modules/posix
npm WARN checkPermissions Missing write access to /usr/games/minecraft/node_modules/posix/node_modules
npm WARN checkPermissions Missing write access to /usr/games/minecraft/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/games/minecraft/node_modules/posix/node_modules/nan
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/games/minecraft/node_modules/posix/node_modules/nan'
npm ERR!  { [Error: EACCES: permission denied, access '/usr/games/minecraft/node_modules/posix/node_modules/nan']
npm ERR!   stack:
npm ERR!    'Error: EACCES: permission denied, access \'/usr/games/minecraft/node_modules/posix/node_modules/nan\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/games/minecraft/node_modules/posix/node_modules/nan' }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/richard/.npm/_logs/2020-02-28T23_42_20_810Z-debug.log

Whoops, forgot to run as root…

# npm install posix

> posix@4.2.0 install /usr/games/minecraft/node_modules/posix
> node-gyp rebuild

make: Entering directory '/usr/games/minecraft/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
In file included from ../src/posix.cc:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                              ^
In file included from ../../nan/nan.h:54,
                 from ../src/posix.cc:1:
../src/posix.cc: At global scope:
/root/.cache/node-gyp/10.19.0/include/node/node.h:573:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
                                           ^
/root/.cache/node-gyp/10.19.0/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
   ^~~~~~~~~~~~~
../src/posix.cc:709:1: note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(posix, init);
 ^~~~~~~~~~~
In file included from /root/.cache/node-gyp/10.19.0/include/node/node.h:63,
                 from ../../nan/nan.h:54,
                 from ../src/posix.cc:1:
/root/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/root/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78:   required from here
/root/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61:   required from here
/root/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
  SOLINK_MODULE(target) Release/obj.target/posix.node
  COPY Release/posix.node
make: Leaving directory '/usr/games/minecraft/node_modules/posix/build'
+ posix@4.2.0
removed 1 package, updated 1 package and audited 1297 packages in 3.35s
found 2 vulnerabilities (1 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

I tried changing the “^4.2.0” to just “4.2.0” in package.json and rebuilding but didn’t seem to make a difference…

I tried switching to the nodejs 12.x stream in CentOS 8 and got the following:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.18.0-147.5.1.el8_1.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/games/minecraft/node_modules/userid
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! userid@0.3.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the userid@0.3.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I had to update userid to a 1.0 beta release to get rid of the error but the result was the same as the original posting.

Should I even try 12.x or just stick with 10.x?

Thanks,
Richard

root@mineos-tkldev .../games/minecraft# node -v
v10.19.0
root@mineos-tkldev .../games/minecraft# npm install posix

> posix@4.2.0 install /usr/games/minecraft/node_modules/posix
> node-gyp rebuild

make: Entering directory '/usr/games/minecraft/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
  SOLINK_MODULE(target) Release/obj.target/posix.node
  COPY Release/posix.node
make: Leaving directory '/usr/games/minecraft/node_modules/posix/build'
+ posix@4.2.0
updated 1 package and audited 1309 packages in 3.51s

v10.19.0 is known to work. Previous to me testing this current version, every version of v10.x I’ve used also worked without issue.

I do not believe v12 is worth exploring, because it’s highly likely that at least of the npm packages the webui depends on will not build (as is the case with posix and userid).

It’s also possible that you still have a bunch of npm modules built by v10 and you’re now mixing them with v12, so you should delete those modules on each build attempt:

cd /usr/games/minecraft
rm -rf node_modules

Ok, I went back to 10.x and did a git pull (I noticed a few updated packages) and now I have a working interface!

Building spigot right now but looks like everything is ok!

1 Like