[Solved]Unable to update/install

Hello,

first, i will apologize for my english.
Second, here is my problem, i was using mineos-node in our dedicated server since a while ans today, i wanted to update my servers.
So, i tried to update but the npm install get an error.
i deleted the /usr/games/minecraft directory and tried to install from scratch
same error.
I’m on a debian 8 apt-get update and upgrade done
Please help me

[code]root@dedi:/usr/games/minecraft# ls
auth.js html LICENSE.md mineos_console.js package.json server.js test
generate-sslcert.sh init mineos.conf mineos.js README.md service.js webui.js
root@dedi:/usr/games/minecraft# chmod +x generate-sslcert.sh
root@dedi:/usr/games/minecraft# ./generate-sslcert.sh
Generating a 1024 bit RSA private key
…++++++
…++++++
writing new private key to ‘.tmpkey.pem’

writing RSA key
root@dedi:/usr/games/minecraft# npm install
npm WARN engine hawk@3.1.0: wanted: {“node”:">=0.10.32"} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine address@1.0.0: wanted: {“node”:">= 0.12.0"} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN deprecated static-favicon@1.0.2: use serve-favicon module
npm WARN engine cryptiles@2.0.5: wanted: {“node”:">=0.10.40"} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine hoek@2.16.3: wanted: {“node”:">=0.10.40"} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine boom@2.9.0: wanted: {“node”:">=0.10.40"} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})

posix@4.0.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:0:
…/node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
posix.target.mk:84: recipe for target ‘Release/obj.target/posix/src/posix.o’ failed
make: *** [Release/obj.target/posix/src/posix.o] Error 1
make: Leaving directory ‘/usr/games/minecraft/node_modules/posix/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/games/minecraft/node_modules/posix
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! posix@4.0.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the posix@4.0.0 install script.
npm ERR! This is most likely a problem with the posix package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls posix
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install”
npm ERR! cwd /usr/games/minecraft
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
/

userid@0.2.0 install /usr/games/minecraft/node_modules/userid
node-gyp rebuild

make: Entering directory ‘/usr/games/minecraft/node_modules/userid/build’
CXX(target) Release/obj.target/userid/src/userid.o
In file included from …/src/userid.cc:10:0:
…/node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
userid.target.mk:84: recipe for target ‘Release/obj.target/userid/src/userid.o’ failed
make: *** [Release/obj.target/userid/src/userid.o] Error 1
make: Leaving directory ‘/usr/games/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/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/games/minecraft/node_modules/userid
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

utf-8-validate@1.2.1 install /usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
node-gyp rebuild

make: Entering directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build’
CXX(target) Release/obj.target/validation/src/validation.o
In file included from …/src/validation.cc:15:0:
…/node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
validation.target.mk:86: recipe for target ‘Release/obj.target/validation/src/validation.o’ failed
make: *** [Release/obj.target/validation/src/validation.o] Error 1
make: Leaving directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

utf-8-validate@1.2.1 install /usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
node-gyp rebuild

make: Entering directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build’
CXX(target) Release/obj.target/validation/src/validation.o
In file included from …/src/validation.cc:15:0:
…/node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
validation.target.mk:86: recipe for target ‘Release/obj.target/validation/src/validation.o’ failed
make: *** [Release/obj.target/validation/src/validation.o] Error 1
make: Leaving directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

bufferutil@1.2.1 install /usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
node-gyp rebuild

make: Entering directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build’
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from …/src/bufferutil.cc:16:0:
…/node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
bufferutil.target.mk:86: recipe for target ‘Release/obj.target/bufferutil/src/bufferutil.o’ failed
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/games/minecraft/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate@1.2.1
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

bufferutil@1.2.1 install /usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
node-gyp rebuild

make: Entering directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build’
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from …/src/bufferutil.cc:16:0:
…/node_modules/nan/nan.h:316:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
^
bufferutil.target.mk:86: recipe for target ‘Release/obj.target/bufferutil/src/bufferutil.o’ failed
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory ‘/usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.14.32-xxxx-grs-ipv6-64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/games/minecraft/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN optional dep failed, continuing bufferutil@1.2.1
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm WARN optional dep failed, continuing bufferutil@1.2.1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/games/minecraft/npm-debug.log
npm ERR! not ok code 0
root@dedi:/usr/games/minecraft#

[/code]

Node has relatively recent been released in its first “stable” incarnation, version 4.0. Unfortunately, many distributions have not yet been able to go through all their testing suites to make sure they can include it.

I have updated the instructions on the wiki for installing NodeJS 4.0.

So, for you specifically, remove the old version of node (probably 0.12.x):
apt-get remove nodejs nodejs-legacy npm

Then run the commands from the wiki to install the new node. npm install will work this time, and you’ll be on the best version of node currently available.

it worked perfectly, thanks