I cant update mineos on Freenas to work with Minecraft 1.12.2

I downloaded mineos from the plugin manager. Then i updatet it using these steps:

pkg install -y npm openjdk8
sed -i ‘’ -e ‘s|^(command=").(")$|\1/usr/local/bin/node\2|’ /usr/local/etc/rc.d/mineos
sed -i ‘’ -e 's|^(start_precmd=").
(")$|\1export PATH=$PATH:/usr/local/bin:/usr/pbi/mineos-amd64/bin\2|’ /usr/local/etc/rc.d/mineos
sed -i ‘’ -e ‘s|^([[:space:]])/./npm([[:space:]].*)$|\1CXX=c++ /usr/local/bin/npm\2|’ /usr/local/etc/rc.d/mineos
service mineos onestop
service mineos oneupdate
service mineos start

But all i got was some error and then i couldnt start mineos again at all.
Help is appreciated.

all i got was some error
What error? An actuall error message, or even better a copy of your logs, would help us help you…

Did you search the forum to see if any of the other freenas threads contained a solution?
https://discourse.codeemo.com/search?q=freenas

gyp ERR! stack Error: `gmake` failed with exit code: 2                                                                              
gyp ERR! stack     at ChildProcess.onExit (/usr/pbi/mineos-amd64/lib/node_modules/npm/node_modules/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:810:12)                                                 
gyp ERR! System FreeBSD 11.1-STABLE                                                                                                 
gyp ERR! command "node" "/usr/pbi/mineos-amd64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"                
gyp ERR! cwd /usr/pbi/mineos-amd64/share/mineos/mineos-node/node_modules/posix                                                      
gyp ERR! node -v v0.10.31                                                                                                           
gyp ERR! node-gyp -v v1.0.1                                                                                                         
gyp ERR! not ok                                                                                                                     
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 most likely a problem with the userid 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 userid                                                                                                    
npm ERR! There is likely additional logging output above.                                                                           
npm ERR! System FreeBSD 11.1-STABLE                                                                                                 
npm ERR! command "node" "/usr/pbi/mineos-amd64/bin/npm" "--prefix" "/usr/pbi/mineos-amd64/share/mineos/mineos-node" "update" "--pyth
on=/usr/pbi/mineos-amd64/bin/python2.7"                                                                                             
npm ERR! cwd /                                                                                                                      
npm ERR! node -v v0.10.31                                                                                                           
npm ERR! npm -v 1.4.25                                                                                                              
npm ERR! code ELIFECYCLE                                                                                                            
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.31","npm":"1.4.25"})                          
npm WARN engine boom@2.10.1: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.31","npm":"1.4.25"})                              
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.31","npm":"1.4.25"})                              
npm WARN package.json babel-traverse@6.11.4 No description                                                                          
nodeunit@0.9.5 usr/pbi/mineos-amd64/share/mineos/mineos-node/node_modules/nodeunit                                                  
└── tap@7.1.2 (os-homedir@1.0.1, clean-yaml-object@0.1.0, opener@1.4.3, stack-utils@0.4.0, signal-exit@3.0.2, color-support@1.1.3, i
sexe@1.1.2, only-shallow@1.2.0, deeper@2.1.0, tmatch@2.0.1, bluebird@3.5.1, tap-parser@2.2.3, readable-stream@2.3.6, tap-mocha-repor
ter@2.0.1, glob@7.1.2, foreground-child@1.5.6, js-yaml@3.12.0, coveralls@2.13.3, nyc@7.1.0)                                         
npm ERR!                                                                                                                            
npm ERR! Additional logging details can be found in:                                                                                
npm ERR!     /npm-debug.log                                                                                                         
npm ERR! not ok code 0```

is what i got after oneupdate

Now the plugin starts but i cant accses the web ui.

Now i can access the web ui but i cant log in with mcserver

I now really cant login! The update worked fine.

This error shows that the userid module isn’t being built. You can verify this by going to any non-mineos directory, such as your users’ home directory and typing npm install userid.

If this doesn’t build (and it probably won’t), it points to:

  1. a userid bug (less likely)
  2. a package compatibility issue with the version of nodejs you’re using (more likely).

You’re using node v0.10.31, which is a PRE-RELEASE version of NodejS, dating back to Jan 26, 2015.

I recommend you update to Node v8.x.y.

So i should reinstall? After updating node? And how do i do that?

No need to reinstall. How did you get node installed originally?

After node is updated, you’d build userid with npm install userid and restart the webui.

I just updated node and built the userid but now im getting
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-19T15_21_28_806Z-debug.log
root@mineos_1:/ # npm build userid
npm ERR! path /userid/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open ‘/userid/package.json’
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-19T15_21_41_426Z-debug.log

I made a mistake and meant npm install userid, sorry!

I just reinstalled and i updatet java-jre to version 8 in the mineos jail, and it worked but then i started getting java errors after i did some dumb shit. So i reinstalled updated ti java-jre 8 and now i cant start 1.12.2 servers again. Its like i´m cursed.

Can you tell me all the dependencys of mineos for 1.12.2 servers so i can install them all.

There’s no dependencies of MineOS for any given server.

There’s dependencies for MineOS to just open/work. If you’re getting java errors, it’s probably better to know what those errors are and to address them directly, rather than handle dependencies for MineOS which may already be satisfied.

But thats the thing. Im not getting any errors. It just doesnt work.

That’s because you’re still running Node 0.10.x. You need a newer version of node.

I understand you’ve attempted to download a newer version, but it does not appear to be the version that MineOS can find–is it possible you remove the conflicting version so that the newer version is the only one available?

Otherwise, you might consider a distribution that isn’t FreeNAS + plugin (I didn’t create the plugin).

Well i tried pkg delete node after reinstalling the plugin but it couldnt find any node installation. So i used pkg install node and i got the exact same error.

Well, at this point I’d encourage you to explore ideas that don’t involve using pkg for installing node (such as ports or pre-compiled binaries), or using a different distro for MineOS.

Node 0.10 is just too old. It would be unreasonable to support a piece of software that was released in March 2013–the API is too old and surely it would be lowly performant and buggy to still use pre-release software when there has been well over 5 years of mature development.

All the problems you’re running into are linked to using MineOS as a FreeNAS plugin (again, the only way MineOS is distributed that is unofficial.)