MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.86k stars 496 forks source link

DietPi-Software | MineOS installation breaks on npm #1880

Closed MichaIng closed 5 years ago

MichaIng commented 6 years ago

Creating a bug report/issue:

Required Information:

Additional Information (if applicable):

Steps to reproduce:

  1. Install MineOS
  2. Watch npm errors
  3. Try to create new server with webui

Expected behaviour:

Actual behaviour:

Extra details:

npm install log ``` > posix@4.1.2 install /mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/posix > node-gyp rebuild make: Entering directory '/mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/posix/build' CXX(target) Release/obj.target/posix/src/posix.o ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_chroot(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:121:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value dir_path(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_getrlimit(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:177:54: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value rlimit_name(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_setrlimit(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:217:54: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value rlimit_name(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_getpwnam(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:288:52: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value pwnam(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_getgrnam(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:333:52: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value pwnam(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_initgroups(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:373:47: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value unam(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_openlog(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:449:48: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value ident(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_syslog(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:481:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value message(info[1]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_sethostname(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:591:34: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value str(info[0]); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_swapon(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:618:34: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value str(info[0]); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_swapoff(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:639:34: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value str(info[0]); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../node_modules/nan/nan.h:51, from ../src/posix.cc:1: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ SOLINK_MODULE(target) Release/obj.target/posix.node COPY Release/posix.node make: Leaving directory '/mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/posix/build' > userid@0.3.1 install /mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/userid > node-gyp rebuild make: Entering directory '/mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/userid/build' CXX(target) Release/obj.target/userid/src/userid.o In file included from ../../nan/nan.h:190:0, from ../src/userid.cc:11: ../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe Nan::ForceSet(v8::Local, v8::Local, v8::Local, v8::PropertyAttribute)’: ../../nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’ return obj->ForceSet(GetCurrentContext(), key, value, attribs); ^~~~~~~~ In file included from ../src/userid.cc:11:0: ../../nan/nan.h: In function ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local*)’: ../../nan/nan.h:817:60: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, v8::Local, int, v8::Local*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, func, argc, argv); ^ In file included from ../../nan/nan.h:47:0, from ../src/userid.cc:11: /root/.node-gyp/10.5.0/include/node/node.h:172:50: note: declared here NODE_EXTERN v8::Local MakeCallback( ^ /root/.node-gyp/10.5.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ In file included from ../src/userid.cc:11:0: ../../nan/nan.h: In function ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local*)’: ../../nan/nan.h:831:62: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, v8::Local, int, v8::Local*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, symbol, argc, argv); ^ In file included from ../../nan/nan.h:47:0, from ../src/userid.cc:11: /root/.node-gyp/10.5.0/include/node/node.h:165:50: note: declared here NODE_EXTERN v8::Local MakeCallback( ^ /root/.node-gyp/10.5.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ In file included from ../src/userid.cc:11:0: ../../nan/nan.h: In function ‘v8::Local Nan::MakeCallback(v8::Local, const char*, int, v8::Local*)’: ../../nan/nan.h:845:62: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, const char*, int, v8::Local*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, method, argc, argv); ^ In file included from ../../nan/nan.h:47:0, from ../src/userid.cc:11: /root/.node-gyp/10.5.0/include/node/node.h:158:50: note: declared here NODE_EXTERN v8::Local MakeCallback( ^ /root/.node-gyp/10.5.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ In file included from ../src/userid.cc:11:0: ../../nan/nan.h: In member function ‘v8::Local Nan::Callback::Call_(v8::Isolate*, v8::Local, int, v8::Local*) const’: ../../nan/nan.h:1463:5: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, v8::Local, int, v8::Local*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] )); ^ In file included from ../../nan/nan.h:47:0, from ../src/userid.cc:11: /root/.node-gyp/10.5.0/include/node/node.h:172:50: note: declared here NODE_EXTERN v8::Local MakeCallback( ^ /root/.node-gyp/10.5.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’ __attribute__((deprecated(message))) declarator ^~~~~~~~~~ ../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Gids(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/userid.cc:75:48: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value utfname(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../../nan/nan.h:47, from ../src/userid.cc:11: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Gid(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/userid.cc:118:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value utfname(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../../nan/nan.h:47, from ../src/userid.cc:11: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Uid(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/userid.cc:155:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated: Use Isolate version [-Wdeprecated-declarations] String::Utf8Value utfname(info[0]->ToString()); ^ In file included from /root/.node-gyp/10.5.0/include/node/v8.h:26:0, from /root/.node-gyp/10.5.0/include/node/node.h:63, from ../../nan/nan.h:47, from ../src/userid.cc:11: /root/.node-gyp/10.5.0/include/node/v8.h:2852:28: note: declared here explicit Utf8Value(Local obj)); ^ /root/.node-gyp/10.5.0/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ userid.target.mk:95: recipe for target 'Release/obj.target/userid/src/userid.o' failed make: *** [Release/obj.target/userid/src/userid.o] Error 1 make: Leaving directory '/mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/userid/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) gyp ERR! System Linux 4.9.0-6-amd64 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 /mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/userid gyp ERR! node -v v10.5.0 gyp ERR! node-gyp -v v3.6.2 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/2018-06-28T16_55_07_748Z-debug.log ```
root@VM-Stretch:/mnt/dietpi_userdata/mineos/minecraft# npm install --unsafe-perm
npm ERR! path /mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/nyc/node_modules/amdefine
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/nyc/node_modu                                                                             les/amdefine' -> '/mnt/0e1fef85-e95c-4777-83ea-4339d1d043e5/dietpi_userdata/mineos/minecraft/node_modules/nyc/node_modules/.amdefine.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-06-28T17_13_05_913Z-debug.log
LexiconCode commented 6 years ago

@MichaIng Reach out to the author hexparrot Will Dizon on the MineOS Forums. He is very approachable and will tweak the source code of MineOS if needed.

symbios24 commented 6 years ago

Thanks

MichaIng commented 6 years ago

Retest on VM Jessie:

Terminal output ``` Cloning into 'minecraft'... remote: Counting objects: 5803, done. remote: Compressing objects: 100% (2/2), done. remote: Total 5803 (delta 1), reused 0 (delta 0), pack-reused 5801 Receiving objects: 100% (5803/5803), 4.95 MiB | 972.00 KiB/s, done. Resolving deltas: 100% (3407/3407), done. Checking connectivity... done. > posix@4.1.2 install /mnt/dietpi_userdata/mineos/minecraft/node_modules/posix > node-gyp rebuild make: Entering directory '/mnt/dietpi_userdata/mineos/minecraft/node_modules/posix/build' CXX(target) Release/obj.target/posix/src/posix.o ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_chroot(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:121:51: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value dir_path(info[0]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_getrlimit(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:177:54: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value rlimit_name(info[0]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_setrlimit(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:217:54: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value rlimit_name(info[0]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_getpwnam(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:288:52: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value pwnam(info[0]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_getgrnam(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:333:52: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value pwnam(info[0]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_initgroups(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:373:47: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value unam(info[0]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_openlog(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:449:48: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value ident(info[0]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_syslog(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:481:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value message(info[1]->ToString()); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_sethostname(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:591:34: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value str(info[0]); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_swapon(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:618:34: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value str(info[0]); ^ ../src/posix.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE node_swapoff(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/posix.cc:639:34: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value str(info[0]); ^ SOLINK_MODULE(target) Release/obj.target/posix.node COPY Release/posix.node make: Leaving directory '/mnt/dietpi_userdata/mineos/minecraft/node_modules/posix/build' > userid@0.3.1 install /mnt/dietpi_userdata/mineos/minecraft/node_modules/userid > node-gyp rebuild make: Entering directory '/mnt/dietpi_userdata/mineos/minecraft/node_modules/userid/build' CXX(target) Release/obj.target/userid/src/userid.o In file included from ../../nan/nan.h:190:0, from ../src/userid.cc:11: ../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe Nan::ForceSet(v8::Local, v8::Local, v8::Local, v8::PropertyAttribute)’: ../../nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’ return obj->ForceSet(GetCurrentContext(), key, value, attribs); ^ In file included from ../src/userid.cc:11:0: ../../nan/nan.h: In function ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local*)’: ../../nan/nan.h:817:60: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, v8::Local, int, v8::Local*)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/node.h:171): Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, func, argc, argv); ^ ../../nan/nan.h: In function ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local*)’: ../../nan/nan.h:831:62: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, v8::Local, int, v8::Local*)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/node.h:164): Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, symbol, argc, argv); ^ ../../nan/nan.h: In function ‘v8::Local Nan::MakeCallback(v8::Local, const char*, int, v8::Local*)’: ../../nan/nan.h:845:62: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, const char*, int, v8::Local*)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/node.h:157): Use MakeCallback(..., async_context) [-Wdeprecated-declarations] v8::Isolate::GetCurrent(), target, method, argc, argv); ^ ../../nan/nan.h: In member function ‘v8::Local Nan::Callback::Call_(v8::Isolate*, v8::Local, int, v8::Local*) const’: ../../nan/nan.h:1463:5: warning: ‘v8::Local node::MakeCallback(v8::Isolate*, v8::Local, v8::Local, int, v8::Local*)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/node.h:171): Use MakeCallback(..., async_context) [-Wdeprecated-declarations] )); ^ ../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Gids(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/userid.cc:75:48: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value utfname(info[0]->ToString()); ^ ../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Gid(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/userid.cc:118:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value utfname(info[0]->ToString()); ^ ../src/userid.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Uid(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/userid.cc:155:50: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local)’ is deprecated (declared at /root/.node-gyp/10.6.0/include/node/v8.h:2851): Use Isolate version [-Wdeprecated-declarations] String::Utf8Value utfname(info[0]->ToString()); ^ userid.target.mk:95: recipe for target 'Release/obj.target/userid/src/userid.o' failed make: *** [Release/obj.target/userid/src/userid.o] Error 1 make: Leaving directory '/mnt/dietpi_userdata/mineos/minecraft/node_modules/userid/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) gyp ERR! System Linux 3.16.0-6-amd64 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 /mnt/dietpi_userdata/mineos/minecraft/node_modules/userid gyp ERR! node -v v10.6.0 gyp ERR! node-gyp -v v3.6.2 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/2018-07-17T16_16_48_276Z-debug.log ```
end of debug.log ``` 11516 verbose stack Error: userid@0.3.1 install: `node-gyp rebuild` 11516 verbose stack Exit status 1 11516 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16) 11516 verbose stack at EventEmitter.emit (events.js:182:13) 11516 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 11516 verbose stack at ChildProcess.emit (events.js:182:13) 11516 verbose stack at maybeClose (internal/child_process.js:961:16) 11516 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5) 11517 verbose pkgid userid@0.3.1 11518 verbose cwd /mnt/dietpi_userdata/mineos/minecraft 11519 verbose Linux 3.16.0-6-amd64 11520 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--unsafe-perm" 11521 verbose node v10.6.0 11522 verbose npm v6.1.0 11523 error code ELIFECYCLE 11524 error errno 1 11525 error userid@0.3.1 install: `node-gyp rebuild` 11525 error Exit status 1 11526 error Failed at the userid@0.3.1 install script. 11526 error This is probably not a problem with npm. There is likely additional logging output above. 11527 verbose exit [ 1, true ] ```

Switch to Node v8: npm install -g n && n 8:

root@VM-Jessie:/mnt/dietpi_userdata/mineos/minecraft# npm install --unsafe-perm
npm ERR! path /mnt/dietpi_userdata/mineos/minecraft/node_modules/nyc/node_modules/amdefine
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/dietpi_userdata/mineos/minecraft/node_modules/nyc/node_modules/amdefine' -> '/mnt/dietpi_userdata/mineos/minecraft/node_modules/nyc/node_modules/.amdefine.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-07-17T16_30_52_204Z-debug.log

Using alternative method to install NodeJS via repo:

curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get -y install nodejs
MichaIng commented 6 years ago

Restart from scratch, using official Node v8 install method directly:

curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get -y install nodejs

🈯️ Install succeeds. Above install method creates node binary at expected location, thus ln -s /usr/bin/node /usr/local/bin/node is needed or sed -i '/^command=/c\command=/usr/local/bin/node webui.js' /etc/supervisor/conf.d/mineos.conf needs to be removed from configuration script.

@Fourdee Since this is at least the second software title that needs Node 8 (Koel as well), maybe we should either:

With Java we could btw. do the same, as Java 10 is available.

Fourdee commented 6 years ago

@MichaIng

Since this is at least the second software title that needs Node 8 (Koel as well), maybe we should either: Fully revert to Node 8

Yep I agree 👍 , then offer alternative versions at a later date in the future?

Only issue is we'd need to fully this test with all node pre-req programs, and, somehow patch existing users down to this version (we could probably uninstall then install again I believe for this).

MichaIng commented 6 years ago

@Fourdee For now maybe it's easier to add Node 8 as new install option and just verify again that it's working (duet to different install method) with Koel. As long as all other software titles work with the current version/install method, we should not change something there.

We could call the new install NodeJS legacy e.g., then it's clear that it should only be seen as a compatibility fallback.

I will create a PR to test: https://github.com/Fourdee/DietPi/pull/1936

MichaIng commented 6 years ago

Okay, actually the Koel solution works for MineOS as well. Node 8 just needs to be installed directly instead of failed Node 10 install attempt 😄.

Will test on all Distros: 🈯️ Jessie 🈯️ Stretch 🈯️ Buster

€: Okay commit added: https://github.com/Fourdee/DietPi/commit/8289982c50474ed7009a7f53a819e9866556680d This should be it, but test on non x86_64 would be best, just to be sure.

Fourdee commented 6 years ago

ARMv7 Stretch, MineOS + NetData:

writing new private key to '.tmpkey.pem'
-----
writing RSA key
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
cp: cannot stat '/var/games/minecraft/*': No such file or directory
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 228

root@DietPi:~# ls -lha /var/games/minecraft
lrwxrwxrwx 1 mineos mineos 38 Jul 18 17:46 /var/games/minecraft -> /mnt/dietpi_userdata/mineos/serverdata

Doesn't support symlinks?

Ah ./generate-sslcert.sh runs before mkdir

🈴 linux-x86.tar.gz?

/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ n@2.1.12
added 1 package from 4 contributors in 1.739s

     install : node-v8.11.3
       mkdir : /usr/local/n/versions/node/8.11.3
       fetch : https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x86.tar.gz
######################################################################## 100.0%
/usr/local/bin/n: line 590: /usr/local/bin/node: cannot execute binary file: Exec format error
   installed :

/usr/local/bin/node: 1: /usr/local/bin/node: Syntax error: word unexpected (expecting ")")

🈺 Christ, 2nd test is fine, weird. We have no G_HW_ARCH usage here, so appears the nodejs install script is to blame.

[  OK  ] DietPi-Software | G_AGI: python python3 supervisor rdiff-backup screen rsync
Cloning into 'minecraft'...
remote: Counting objects: 5803, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5803 (delta 1), reused 0 (delta 0), pack-reused 5801
Receiving objects: 100% (5803/5803), 4.95 MiB | 2.65 MiB/s, done.
Resolving deltas: 100% (3407/3407), done.
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ n@2.1.12
added 1 package from 4 contributors in 0.933s

     install : node-v8.11.3
       mkdir : /usr/local/n/versions/node/8.11.3
       fetch : https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-armv7l.tar.gz

Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 228

root@DietPi:~# ls -lha /usr/lib/python2.7/socket.py
-rw-r--r-- 1 root root 21K Nov 24  2017 /usr/lib/python2.7/socket.py
MichaIng commented 6 years ago

@Fourdee Ah, I was already wondering why the error about missing dir still occurs after pre-creating it. So we move to in front of ./generate-sslcert.sh 👍.

Strange, but Node 10 is the correct ARMv7 version?

Fourdee commented 6 years ago

@MichaIng

Strange, but Node 10 is the correct ARMv7 version?

Yep:

root@DietPi:~# ./node_install.sh
Node Linux Installer by www.github.com/taaem
Running as Root User
Get Latest Version Number...
Done
Downloading latest stable Version node-v10.6.0-linux-armv7l.tar.gz...
MichaIng commented 6 years ago

Okay, retested successfully here. Hmm Node installs/builds stay a bid unreliable, but it's the best we can do?

€: error: <class 'socket.error'>, [Errno 2] No such file or directory: file: /usr/lib/python2.7/socket.py line: 224 stays, but can't see any negative effect.

Fourdee commented 6 years ago

@MichaIng

Okay, retested successfully here. Hmm Node installs/builds stay a bid unreliable, but it's the best we can do?

Yep, outside our control.

Just trying to run MineOS as non-root, will send commit if successful.

supervisor process reports root user, however, if we do not set the following:

chown mineos:dietpi /etc/ssl/certs/mineos*

MineOS fails to load:

base_directory found in mineos.conf, using: /var/games/minecraft
Could not locate required SSL files /etc/ssl/certs/mineos.{key,crt}, aborting server start.

So we can assume that under the hood of supervisor, mineOS is running as non-root user. However, web login fails and renders a ERR_EMPTY_RESPONSE, ~so back to root for this one.~ Same issue now running as root, i may of broke something, or it doesn't work with nodejs v8? works as root login for web interface.

Or

useradd mineos
echo -e "$GLOBAL_PW\n$GLOBAL_PW\n" | passwd mineos

is somehow different to useradd -rm mineos -p "$GLOBAL_PW" -G dietpi -s /usr/bin/nologin?


Nope, must run as root. And the mineos user login for web interface no longer works with nodejs v8. root user required.

Fourdee commented 6 years ago

🈯️ Test install passed.

Completed.

athisun commented 5 years ago

🈴 linux-x86.tar.gz?

/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ n@2.1.12
added 1 package from 4 contributors in 1.739s

     install : node-v8.11.3
       mkdir : /usr/local/n/versions/node/8.11.3
       fetch : https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x86.tar.gz
######################################################################## 100.0%
/usr/local/bin/n: line 590: /usr/local/bin/node: cannot execute binary file: Exec format error
   installed :

/usr/local/bin/node: 1: /usr/local/bin/node: Syntax error: word unexpected (expecting ")")

I'm having this same issue when attempting to install MineOS on a RockPro64 (aarch64) with Dietpi v6.21.1, albeit with node v8.15.0 instead of v8.11.3. Could you please expand on how you were able to get n to install the correct architecture here:

🈺 Christ, 2nd test is fine, weird. We have no G_HW_ARCH usage here, so appears the nodejs install script is to blame.

[  OK  ] DietPi-Software | G_AGI: python python3 supervisor rdiff-backup screen rsync
Cloning into 'minecraft'...
remote: Counting objects: 5803, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5803 (delta 1), reused 0 (delta 0), pack-reused 5801
Receiving objects: 100% (5803/5803), 4.95 MiB | 2.65 MiB/s, done.
Resolving deltas: 100% (3407/3407), done.
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
+ n@2.1.12
added 1 package from 4 contributors in 0.933s

     install : node-v8.11.3
       mkdir : /usr/local/n/versions/node/8.11.3
       fetch : https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-armv7l.tar.gz

Update: I was able to get MineOS installed by reinstalling Node via dietpi-software, manually installing n with npm install -g n, manually specifying the architecture n -a arm64 8, then reinstalling MineOS. Is this something that can be fixed in DietPi for future installs?

MichaIng commented 5 years ago

@DeathIsUnknown Hmm Node install, npm install -g n and n 8 is done within the install code already. Not sure if n -a arm64 8 so setting the architecture was the required step in your case, e.g. for ARMv8 in general?

athisun commented 5 years ago

@MichaIng

so setting the architecture was the required step in your case, e.g. for ARMv8 in general?

I believe so, yes. Even now, if I try n 11, I get:

root@dietpi:~# n 11

     install : node-v11.10.0

  Error: invalid version 11.10.0

According to this issue's comment, this error crops up when n can't find a corresponding pre-built binary from nodejs. However, arm64 binaries are available, and specifying n -a arm64 11 confirms n is requesting the wrong architecture.

root@dietpi:~# n -a arm64 11

     install : node-v11.10.0
       mkdir : /usr/local/n/versions/node/11.10.0
       fetch : https://nodejs.org/dist/v11.10.0/node-v11.10.0-linux-arm64.tar.gz

I am assuming that, as Fourdee found in his test, n is still attempting to target x86 (of which Node has dropped Linux support since v10) on my ARMv8 device - unfortunately I don't have other hardware to confirm if it's a common issue across similar devices.

MichaIng commented 5 years ago

@DeathIsUnknown

I am assuming that, as Fourdee found in his test, n is still attempting to target x86 (of which Node has dropped Linux support since v10) on my ARMv8 device

Now that you say it I remember this issue, ah lol as of this topic 😄. AFAIK it was indeed only for ARMv8 devices, but perhaps to be failsafe we should simply always add the -a option.

athisun commented 5 years ago

Looks like a pull request was made to add support for ARMv8 back in 2017, but it still hasn't been approved. https://github.com/tj/n/pull/448

MichaIng commented 5 years ago

@DeathIsUnknown Thanks for linking this issue. If shows very clearly where the issue relies. A pain that the PR is opened for years and already approved by all two reviewers but still not merged. It is so simple and clear that there is not even any "review" required. ARMv8 has simply been forgotten or not yet added ...

Lets get this fixed for all n calls in dietpi-software...

PR up and merged: https://github.com/Fourdee/DietPi/pull/2562/files

Many thanks for reporting and researching this 👍!! I mark the issue as closed again, but feel free to use, if required.

athisun commented 5 years ago

Bit of a follow-up, n has been updated to support ARM64: https://github.com/tj/n/pull/448#issuecomment-477898698 https://github.com/tj/n/releases/tag/v3.0.0

MichaIng commented 5 years ago

@DeathIsUnknown Many thanks for the information. So we can remove the workaround then, although a quick test should be good:

npm i -g n
n 8
athisun commented 5 years ago

@MichaIng My SBC is offline at the moment until I figure out a kernel issue, so I won't be able to test on an ARM64 platform. Sorry!