Setup script attempting to install already-installed LevelDB
Xiph last edited by Xiph
Today, I attempted to install NodeBB with LevelDB.
As per the tutorials, I ran
npm install levelup leveldownafter cloning NodeBB. However, when running
./nodebb setupand chosing
levelas my database, the setup script merrily fetches everything again and attempts to install the already-installed levelup and leveldown packages, which consistently fails with the following error:
EDIT: Please ignore the backslashes at the start of the first two lines. They're supposed to escape the greater-than sign to prevent it from becoming another quote, but that doesn't quite seem to work.
/> firstname.lastname@example.org install /home/nginx/melonmancy.net/node_modules/connect-leveldb/node_modules/level/node_modules/leveldown
/> node-gyp rebuild
Traceback (most recent call last):
File "/home/nginx/public/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error
gyp ERR! stack Error:
gypfailed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/nginx/public/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 2.6.32-431.17.1.el6.x86_64
gyp ERR! command "node" "/home/nginx/public/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/nginx/public/node_modules/connect-leveldb/node_modules/level/node_modules/leveldown
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
Attempting the same on a clean installation, except not running
npm install levelup leveldownmanually since the script seems to insist upon running it itself results in the exact same error. Attempted the same thing on an Ubuntu machine instead (the previous was all done on CentOS), with no luck. The exact same error occurred once again.
Xiph last edited by
Seems like there's something wrong with in node_modules/npm/node-gyp. Tried removing it and replacing it with the latest version that yum provides (which was able to successfully compile the packages when I did it manually, but which for some reason the scripts wants to do again), which is v0.10.6.
However, now the install fails with
warn: NodeBB Setup Aborted. Failed to parse json Unexpected end of inputwhile fetching the packages it shouldn't need to fetch at all.
Actually it doesn't matter which db you choose, the system (as of maybe a month and a bit ago?) will re-install the relevant database packages as soon as you select it in the install steps (as opposed to installing it initially when you do
npm installfor the first time). So your problem really is, that LevelDB might have some issues installing with CentOS?
Have a look here, if it works for you I'd definitely appreciate if you can let me know what you did so that I can add it to the docs