NPM error, cant update webUI

I’ve been searching through this forum for days now trying figure out this issue. When trying to update the webUI I get an error from npm install, specifically for the posix build process. It spits out error code ELIFECYCLE and the error output references thats class v8 has no member class ForceSet. It also throws a ton of warnings about the nan nodejs package.

System Info:
Linux 4.16.8-1-ARCH
node v10.1.0
npm v6.0.1
pkgid posix@4.1.1
node-gyp v3.6.2

posix@4.1.1 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 …/node_modules/nan/nan.h:190,
from …/src/posix.cc:1:
…/node_modules/nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)’:
…/node_modules/nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
return obj->ForceSet(GetCurrentContext(), key, value, attribs);

[PAGES OF NAN RELATED WARNING MESSAGES HERE]

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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Linux 4.16.8-1-ARCH
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/posix
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.1.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.1.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-05-11T03_17_31_779Z-debug.log

Any insight would be greatly appreicated. I first noticed this issue after I upgraded to Linux 4.16. I’ve followed the instructions from the wiki but it always gets stuck at this step. The webUI starts and I can login to it but it freezes after a few seconds.

You’re in luck today. For I have encountered this same issue just recently and I was able to fix it.
For some reason MineOS doesn’t play nice with the most recent version of nodejs.
Firstly, uninstall your current version of node and npm. Then install NVM (Node Version Manager) and follow the instructions on how to install node v8.11.1 which is the latest LTS version. I believe the command is simply nvm install 8.11.1. After that, you should be able to just do an npm install in your mineos directory and everything should be back to normal.

Oh I forgot to mention one thing. Make sure after installing node v8.11.1 run type node to print the location of the binary to the terminal. Make sure you create a symlink for it at /usr/bin/node

1 Like

MineOS was designed with Node when Nodejs was still in heavy development, and–in fact–forked into two major projects. Eventually both projects were merged together and became NodeJS 4.0, the first Long Term release.

It being Javascript, and being so popular at that, the API developed tremendously rapidly, and NodeJS again diverged–there was the 4.x that I was familiar with and was tested against, and there was 6.x, which turned into a whole new beast.

Naturally the higher, more recent versions have great appeal, so they get installed often, but many of the modules I’ve come to depend on failed to update to the new 6.x line–and in some cases would require non-trivial writing of the code.

Long story short, in the near future I still expect the 4.x LTS release to be the targeted node. I’m not sure when life will permit me the amount of time required to get this thing fully up to spec with the rapidly developing API.

1 Like

Installing node v8.11.1 worked! Thanks for the advice :slight_smile: It threw out this info while building but my server is back up and running again at least.

make: Leaving directory ‘/usr/games/minecraft/node_modules/userid/build’
added 545 packages from 429 contributors in 10.255s
[!] 70 vulnerabilities found [1409 packages audited]
Severity: 40 Low | 18 Moderate | 12 High
Run npm audit for more detail

@hexparrot that totally makes sense, I know Arch has a bad rep sometimes as pushing updates for things before they are quite ready and I guess nodejs is one of those things. Thanks for the help, really appricate that you take the time to support your users :slight_smile:

Looks like Node v8 does not require the same rewriting that 5.x and 6.x did. NO IDEA WHY, BUT I’LL TAKE IT.

NodeJS 8 is now the official supported MineOS node backend.

1 Like

So I’m having this problem with a new install on Ubuntu server 16.04.4. I think. I’m getting an error with NPM anyway. I’ve tried doing it both the way the wiki instructs, and with the recommendation above. Still getting an error.

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

sh: 1: node-gyp: Permission denied
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! posix@4.1.2 install: node-gyp rebuild
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the posix@4.1.2 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-18T02_50_12_487Z-debug.log

Any ideas? I’m somewhat desperate because I had a running system, then make some stupid mistakes and I’m trying to get it back up as quickly as possible. :-/

Edit: Just tried again with a completely clean server(only ran apt-get update/upgrade, and the MineOS install script. Got a different series of NPS errors.

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

gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/games/minecraft/node_modules/posix/build’
gyp ERR! System Linux 4.4.0-128-generic
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/posix
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! posix@4.1.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.1.2 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! /home/philip/.npm/_logs/2018-06-18T04_33_29_097Z-debug.log

Try this:

cd 
npm install posix

This is unrelated to MineOS, but relates to the problem module you’re having.

So now I’m really confused. After literally 14 hours straight of working on this(4-5 clean installs of Ubuntu)(granted I’m not Linux genius), I got it.

NO idea why, but when I ran apt upgrade as part of my OS install, some package was breaking it. I just did a clean install where the only thing I did was static IP and SSH, then ran all the commands and it worked flawlessly. Don’t ask me. But I’m tired now.

Philip

2 Likes