Npm install command fails

Hi!

Im trying to install mineos in a truenas jail, everything goes fine until i execute ‘npm install’:
root@mineos2:/usr/local/games/minecraft # npm install

> userid@0.3.1 install /usr/local/games/minecraft/node_modules/userid
> node-gyp rebuild

gmake: Entering directory '/usr/local/games/minecraft/node_modules/userid/build'
  CXX(target) Release/obj.target/userid/src/userid.o
In file included from ../src/userid.cc:11:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/root/.cache/node-gyp/15.14.0/include/node/v8.h:5317:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
/root/.cache/node-gyp/15.14.0/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                      ^
../src/userid.cc:47:42: error: too few arguments to function call, single argument 'context' was not specified
    group = getgrgid(info[0]->Int32Value());
                     ~~~~~~~~~~~~~~~~~~~ ^
/root/.cache/node-gyp/15.14.0/include/node/v8.h:2915:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/root/.cache/node-gyp/15.14.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/userid.cc:75:47: error: too few arguments to function call, single argument 'context' was not specified
  String::Utf8Value utfname(info[0]->ToString());
                            ~~~~~~~~~~~~~~~~~ ^
/root/.cache/node-gyp/15.14.0/include/node/v8.h:2856:3: note: 'ToString' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
  ^
/root/.cache/node-gyp/15.14.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/userid.cc:118:49: error: too few arguments to function call, single argument 'context' was not specified
    String::Utf8Value utfname(info[0]->ToString());
                              ~~~~~~~~~~~~~~~~~ ^
/root/.cache/node-gyp/15.14.0/include/node/v8.h:2856:3: note: 'ToString' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
  ^
/root/.cache/node-gyp/15.14.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/userid.cc:137:41: error: too few arguments to function call, single argument 'context' was not specified
    user = getpwuid(info[0]->Int32Value());
                    ~~~~~~~~~~~~~~~~~~~ ^
/root/.cache/node-gyp/15.14.0/include/node/v8.h:2915:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/root/.cache/node-gyp/15.14.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/userid.cc:155:49: error: too few arguments to function call, single argument 'context' was not specified
    String::Utf8Value utfname(info[0]->ToString());
                              ~~~~~~~~~~~~~~~~~ ^
/root/.cache/node-gyp/15.14.0/include/node/v8.h:2856:3: note: 'ToString' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
  ^
/root/.cache/node-gyp/15.14.0/include/node/v8config.h:431:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
1 warning and 5 errors generated.
gmake: *** [userid.target.mk:107: Release/obj.target/userid/src/userid.o] Error 1
gmake: Leaving directory '/usr/local/games/minecraft/node_modules/userid/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System FreeBSD 12.2-RELEASE-p6
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/games/minecraft/node_modules/userid
gyp ERR! node -v v15.14.0
gyp ERR! node-gyp -v v5.1.0
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.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-04-21T18_46_09_591Z-debug.log

Dont really understand what the root cause of the issue is. Did anyone else ran into this?

Thanks in advance!

It’s quite possible that the webui which has currently been tested on NodeJS 10 does not work on more recent APIs (I see you are using 15.14.0).

Is it possible to use an older version of NodeJS?

Still get errors:
root@mineos2:/usr/local/games/minecraft # node -v
v10.24.1
root@mineos2:/usr/local/games/minecraft # echo “CXX=c++ npm install userid” | sh
> posix@4.2.0 install /usr/local/games/minecraft/node_modules/posix
> node-gyp rebuild

gmake: Entering directory '/usr/local/games/minecraft/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
In file included from ../src/posix.cc:1:
In file included from ../../nan/nan.h:53:
In file included from /root/.cache/node-gyp/10.24.1/include/node/uv.h:52:
In file included from /root/.cache/node-gyp/10.24.1/include/node/uv/errno.h:25:
In file included from /usr/include/c++/v1/errno.h:25:
/usr/include/c++/v1/__config:122:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use
      _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
#error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
 ^
1 error generated.
gmake: *** [posix.target.mk:103: Release/obj.target/posix/src/posix.o] Error 1
gmake: Leaving directory '/usr/local/games/minecraft/node_modules/posix/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System FreeBSD 12.2-RELEASE-p6
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/games/minecraft/node_modules/posix
gyp ERR! node -v v10.24.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the posix@4.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-04-22T18_41_53_593Z-debug.log
root@mineos2:/usr/local/games/minecraft # 
root@mineos2:/usr/local/games/minecraft # 
root@mineos2:/usr/local/games/minecraft # echo "CXX=c++ npm install" | sh

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

gmake: Entering directory '/usr/local/games/minecraft/node_modules/posix/build'
  CXX(target) Release/obj.target/posix/src/posix.o
In file included from ../src/posix.cc:1:
In file included from ../../nan/nan.h:53:
In file included from /root/.cache/node-gyp/10.24.1/include/node/uv.h:52:
In file included from /root/.cache/node-gyp/10.24.1/include/node/uv/errno.h:25:
In file included from /usr/include/c++/v1/errno.h:25:
/usr/include/c++/v1/__config:122:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use
      _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
#error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. \
 ^
1 error generated.
gmake: *** [posix.target.mk:103: Release/obj.target/posix/src/posix.o] Error 1
gmake: Leaving directory '/usr/local/games/minecraft/node_modules/posix/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System FreeBSD 12.2-RELEASE-p6
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/games/minecraft/node_modules/posix
gyp ERR! node -v v10.24.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the posix@4.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-04-22T18_41_56_664Z-debug.log

I haven’t used TrueNAS, but this seems relevant:

Originally i used that but it broke when i ran pkg update then pkg upgrade -y … Seems like i wont able to avoid spinning up a VM.

/EDIT
Did install guide on ubuntu 21.04, guess what i get at the end?
root@mineos-vm:/usr/games/minecraft# supervisorctl start mineos
mineos: ERROR (no such file)

/EDIT2
Tried the iso but no UEFI boot which means no VNC from bhyve… And the link for json file in the truenas thread is dead.

Did you verify the existence of the file /etc/supervisor/conf.d/mineos.conf?

Also did you do the supervisorctl reload?

OFC, done everything according to the wiki but if possible id like to use the jail system in truenas (wont take up ram needlessly unlike a vm)