Picture of Matthew Williams
problems with version upgrade
by Matthew Williams - Thursday, 8 September 2016, 10:11 AM
 

Hi there,

I've encountered some problems building courses and realise I need to upgrade my installations. I was running node v0.10.33. Have followed the instructions to upgrade and have selected 4.2.2 as that seems to be the preferred version at present. The first issue I have is that when I close terminal and restart, it reverts to 0.10.33. I have tried using NVM to switch to 4.2.2 but the switch reverts when restarting terminal. (In addition my nvm install seems to be conflicting with npm installs, however I am able to switch versions manually.)

v0.10.33 will not run now, but if I switch manually to 4.2.2 then attempt to run node server, I get the following errors..... any help gratefully appreciated.

 

Matthew-Williamss-MacBook-Pro:adapt_authoring mswilliams500$ node server

info: [08 Sep 2016 12:02:21 +02:00] configuration loaded from /Users/mswilliams500/adapt_authoring/conf/config.json

info: [08 Sep 2016 12:02:21 +02:00] Supporting the following authentication types:

info: [08 Sep 2016 12:02:21 +02:00] - local

info: [08 Sep 2016 12:02:23 +02:00] app.productname v0.2.1

info: [08 Sep 2016 12:02:23 +02:00] Adapt Framework v2.0.12

info: [08 Sep 2016 12:02:23 +02:00] Connection established: adapt-tenant-master

error: [08 Sep 2016 12:02:23 +02:00] MongoError: connect ECONNREFUSED 127.0.0.1:27017

error: [08 Sep 2016 12:02:23 +02:00] Database Connection failed, please check your database

events.js:141

      throw er; // Unhandled 'error' event

      ^

 

Error: listen EADDRINUSE :::5000

    at Object.exports._errnoException (util.js:874:11)

    at exports._exceptionWithHostPort (util.js:897:20)

    at Server._listen2 (net.js:1234:14)

    at listen (net.js:1270:10)

    at Server.listen (net.js:1366:5)

    at /Users/mswilliams500/adapt_authoring/lib/application.js:486:38

    at /Users/mswilliams500/adapt_authoring/lib/application.js:355:12

    at /Users/mswilliams500/adapt_authoring/lib/database.js:462:14

    at /Users/mswilliams500/adapt_authoring/lib/database.js:386:14

    at /Users/mswilliams500/adapt_authoring/node_modules/async/lib/async.js:131:25

    at /Users/mswilliams500/adapt_authoring/lib/contentmanager.js:1602:9

    at /Users/mswilliams500/adapt_authoring/node_modules/async/lib/async.js:131:25

    at /Users/mswilliams500/adapt_authoring/plugins/content/bower/index.js:124:14

    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

Picture of Matthew Williams
Re: problems with version upgrade
by Matthew Williams - Thursday, 8 September 2016, 1:12 PM
 

Hi again, happy to report I seem to have upgraded everything and with a restart all has fallen into place. 

I have one remaining problem... I can't fix my default node version... my previous version was 0.10.33, and with today's upgrade I now have 4.2.2 installed. Problem is every time I start a new Terminal session, it reverts back to 0.10.33. 

I can change it each time using  $. ~/.nvm/nvm.sh but would like to set the default to 4.2.2
Have tried  $ nvm alias default v4.2.2 but this doesn't permanently change it. 

Any pointers greatly appreciated.

Picture of John Niezen
Re: problems with version upgrade
by John Niezen - Friday, 9 September 2016, 6:56 AM
 

Hi Matthew,

I had the same issue a while ago, what helped me was to uninstall the 0.10.33 version, look for a syntax example here: https://github.com/creationix/nvm

John