Errros When Upgrading from v0.7.x to v1.x.x
-
It's been while since I halted my launch of NodeBB website, but I am resuming my work and want to launch my site. NodeBB is the best forum app, and I haven't seen any alternative I can chose my site to use.
As of now, I am way behind... so forgive me if I might have missed any serious announcement that current versions are depending on.
I have currently 0.7.3-dev. I need to get to v1.4.3. I know NodeBB upgrade has to be incremental, but I am not sure how I will do in my case. I started with moving from origin/0.7.x thinking it would get me to the higher version in that branch (is it even correct?) Then...
- My first obstacle was to know the requirements for the current NodeBB . Obviously not having kept up with the forum discussion is playing its part. If someone can point to how to check that, I will appreciate.
- After turning off my website (
./nodebb stop
) I tried to upgrade following instructions on the documentation site. Then the first thing I noticed in the error message was that I my Nodejs was very old. So, I updated NPM to v4.2.0 and Nodejs to 7.4.0. Was this an appropriate move for NodeBB v1.4.3, by the way? - Then when I retried to upgrade, I got errors that I couldn't understand:
$ ./nodebb upgrade 1. Bringing base dependencies up to date... Error: Command failed: /usr/bin/env npm i --production npm ERR! fetch failed https://registrytwo.npmjs.com/concat-map/-/concat-map-0.0.1.tgz npm WARN retry will retry, error on last attempt: Error: connect ECONNREFUSED 54.68.99.191:443 npm ERR! fetch failed https://registrytwo.npmjs.com/concat-map/-/concat-map-0.0.1.tgz npm WARN retry will retry, error on last attempt: Error: connect ECONNREFUSED 54.68.99.191:443 npm ERR! fetch failed https://registrytwo.npmjs.com/concat-map/-/concat-map-0.0.1.tgz npm ERR! Linux 3.13.0-57-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--production" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! code ECONNREFUSED npm ERR! errno ECONNREFUSED npm ERR! syscall connect npm ERR! Error: connect ECONNREFUSED 54.68.99.191:443 npm ERR! at Object.exports._errnoException (util.js:1022:11) npm ERR! at exports._exceptionWithHostPort (util.js:1045:20) npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14) npm ERR! { Error: connect ECONNREFUSED 54.68.99.191:443 npm ERR! at Object.exports._errnoException (util.js:1022:11) npm ERR! at exports._exceptionWithHostPort (util.js:1045:20) npm ERR! at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14) npm ERR! code: 'ECONNREFUSED', npm ERR! errno: 'ECONNREFUSED', npm ERR! syscall: 'connect', npm ERR! address: '54.68.99.191', npm ERR! port: 443 } npm ERR! npm ERR! If you are behind a proxy, please make sure that the npm ERR! 'proxy' config is set properly. See: 'npm help config'
Can anyone help with understanding what went wrong? Currently, I can't even restart my website.
-
@Zig.gy you're getting errors from npm. It appears that is may be an issue with proxy settings or something. https://github.com/npm/npm/issues/14226
-
@PitaJ , Thank you for your reply. It looks like the other person had to unistall npm then install it. Right?
My issue is which version of npm will I have to install then if I uninstall the latest version I have? Because I am still running NodeBB v0.7.3-dev, and yesterday I upgraded Nodejs to a higher version as I've mentioned in my top post.
-
@Zig.gy so to be safe you should probably roll back your version of Node to v0.12 and npm to v2. That's what those older versions of NodeBB ran on.
-
Thanks @PitaJ,
However, I am now getting new kind of errors when I try to update to NodeBB v0.8.0 from v0.7.3-dev:
1. Bringing base dependencies up to date... OK 2. Updating NodeBB data store schema. 20/2 16:28 [31676] - error: Unable to initialize MongoDB! Is MongoDB installed? Error :Cannot find module 'mongodb' 20/2 16:28 [31676] - error: Error: Cannot find module 'mongodb' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.module.init (~/forum/nodebbrepo/src/database/mongo.js:52:18) at upgrade (~/forum/nodebbrepo/app.js:272:28) at Object.<anonymous> (~/forum/nodebbrepo/app.js:73:2) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) 3. Storing upgrade date in "package.json"... OK NodeBB Upgrade Complete!
-
@Zig.gy does
npm i
result in any errors? -
npm i
results in warnings about unmet dependencies, @PitaJ :npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/lwip requires async@'~0.9.0' but will load npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/async, npm WARN unmet dependency which is version 1.4.2 npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/nconf requires async@'~0.9.0' but will load npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/async, npm WARN unmet dependency which is version 1.4.2 npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/redisearch requires async@'~0.9.0' but will load npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/async, npm WARN unmet dependency which is version 1.4.2
-
I just fixed the errors I was getting when I run
npm i
This is how I did (for future reference purposes):
- Fixing the "missing
mongodb
" error:
21/2 14:45 [3950] - error: Unable to initialize MongoDB! Is MongoDB installed? Error :Cannot find module 'mongodb' 21/2 14:45 [3950] - error: Error: Cannot find module 'mongodb' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17)
Fix:
npm i mongodb
- Fixing the issue with unmet dependencies (as shown in my last post on this topic):
npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/lwip requires async@'~0.9.0' but will load npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/async, npm WARN unmet dependency which is version 1.4.2 npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/nconf requires async@'~0.9.0' but will load npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/async, npm WARN unmet dependency which is version 1.4.2 npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/redisearch requires async@'~0.9.0' but will load npm WARN unmet dependency ~/forum/nodebbrepo/node_modules/async, npm WARN unmet dependency which is version 1.4.2
Fix:
npm install <name of the module>
- Now when I run
npm i
, there no errors or warnings
I hope those will help someone in the future.
Now, let me go back to dealing with my original issue of the long-overdue upgrade
- Fixing the "missing