Picture of Briar Ang
npm package install
by Briar Ang - Thursday, 6 September 2018, 9:19 AM
 

I'm trying to install the Adapt Authoring tool on MAC OSX 10.13.4. 

I'm following the instructions on  https://github.com/adaptlearning/adapt_authoring/wiki/Install-on-Server.

I'm up to step 3 - installing the required npm packages.

I got some errors at the bottom of my terminal log, does this mean it hasn't installed successfully? Any idea how to resolve these errors if I need to? 

iMac:adapt_authoring briar$ npm install --production
npm WARN deprecated bower@1.8.4: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated grunt-bower-requirejs@2.0.0: Deprecated
npm WARN engine archiver@2.1.1: wanted: {"node":">= 4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine grunt-merge-json@0.9.7: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine email-templates@4.0.4: wanted: {"node":">=6.4.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine log-update@2.3.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine less@3.8.1: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine junk@2.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine mongoose@5.2.13: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine nodemailer@4.6.8: wanted: {"node":">=6.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine chalk@2.4.1: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine mime@2.3.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine request@2.88.0: wanted: {"node":">= 4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine cli-cursor@2.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine ansi-escapes@3.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine wrap-ansi@3.0.1: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated bower-requirejs@1.2.0: Deprecated
npm WARN engine ansi-styles@3.2.1: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine supports-color@5.5.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated URIjs@1.12.1: package renamed to "urijs" (lower-case), please update accordingly
npm WARN engine gaze@1.1.3: wanted: {"node":">= 4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated http2@3.3.7: Use the built-in module in node 9.0.0 or newer, instead
npm WARN engine restore-cursor@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine string-width@2.1.1: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine strip-ansi@4.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine grunt-legacy-util@1.1.1: wanted: {"node":">= 6"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated babel-preset-latest@6.24.1: We're super 😸  excited that you're trying to use ES2017+ syntax, but instead of making more yearly presets 😭 , Babel now has a better preset that we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can ship native ES2015+ to user 😎 ! We are also in the process of releasing v7, so please give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel 🙏, please give us a follow on Twitter @babeljs for news on Babel, join slack.babeljs.io for discussion/development and help support the project at opencollective.com/babel
npm WARN engine http2@3.3.7: wanted: {"node":">=0.12.0 <9.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine har-validator@5.1.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine form-data@2.3.2: wanted: {"node":">= 0.12"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine has-flag@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine universalify@0.1.2: wanted: {"node":">= 4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated babel-preset-es2016@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated babel-preset-es2017@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN engine onetime@2.0.1: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine is-fullwidth-code-point@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine ansi-regex@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN engine grunt-legacy-log-utils@2.0.1: wanted: {"node":">=6"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN engine mimic-fn@1.2.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine har-schema@2.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine mocha@5.2.0: wanted: {"node":">= 4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine ret@0.1.15: wanted: {"node":">=0.12"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine ret@0.1.15: wanted: {"node":">=0.12"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine atob@2.1.2: wanted: {"node":">= 4.5.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine deep-extend@0.6.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine esprima@4.0.1: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated jscs-preset-wikimedia@1.0.1: Deprecated in favour of eslint-config-wikimedia. -- https://phabricator.wikimedia.org/T118941
npm WARN engine mquery@3.2.0: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine mongodb@3.1.4: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine mpath@0.5.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine supports-color@5.4.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine growl@1.10.5: wanted: {"node":">=4.x"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine has-flag@3.0.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN engine mpath@0.5.1: wanted: {"node":">=4.0.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine saslprep@1.0.1: wanted: {"node":">=6"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine co@4.6.0: wanted: {"iojs":">= 1.0.0","node":">= 0.12.0"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine phantom@4.0.12: wanted: {"node":">=8"} (current: {"node":"0.10.33","npm":"1.4.28"})
 
> phantomjs-prebuilt@2.1.16 install /Users/briar/Applications/adapt_authoring/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/phantomjs-prebuilt
> node install.js
PhantomJS not found on PATH
Saving to /var/folders/xx/9kjn8gmn4c5cfnct1p7lkny00000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip
Receiving...
  [========================================] 99%
Received 16746K total.
Extracting zip contents
Phantom installation failed [TypeError: Object #<Object> has no method 'isAbsolute'] TypeError: Object #<Object> has no method 'isAbsolute'
    at module.exports (/Users/briar/Applications/adapt_authoring/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/phantomjs-prebuilt/node_modules/extract-zip/index.js:11:12)
    at Promise.extractDownload [as _successFn] (/Users/briar/Applications/adapt_authoring/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/phantomjs-prebuilt/install.js:278:5)
    at nextTickCallback (/Users/briar/Applications/adapt_authoring/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/phantomjs-prebuilt/node_modules/kew/kew.js:47:28)
    at process._tickCallback (node.js:419:13)
npm WARN engine mime@1.6.0: wanted: {"node":">=4"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN optional dep failed, continuing phantomjs-prebuilt@2.1.16
> fsevents@1.2.4 install /Users/briar/Applications/adapt_authoring/node_modules/migrate-mongoose/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents
> node install
[fsevents] Success: "/Users/briar/Applications/adapt_authoring/node_modules/migrate-mongoose/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v11-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm ERR! Error: Method Not Allowed
npm ERR!    at errorResponse (/usr/local/lib/node_modules/npm/lib/cache/add-named.js:260:10)
npm ERR!    at /usr/local/lib/node_modules/npm/lib/cache/add-named.js:203:12
npm ERR!    at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!    at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! System Darwin 17.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "--production"
npm ERR! cwd /Users/briar/Applications/adapt_authoring
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code E405
npm ERR! not ok code

 

Picture of Matt Leathes
Re: npm package install
by Matt Leathes - Thursday, 6 September 2018, 9:15 AM
 

Looking at that output, it looks like you're running a really old version of Node (v0.10.33)

Adapt requires you to have Node v8.x installed.

Picture of Briar Ang
Re: npm package install
by Briar Ang - Thursday, 6 September 2018, 9:56 AM
 

Hi Matt, thanks for the reply!

 You’re right, I’m running Node v0.10.33. I installed NVM but I’m not sure how to use it to switch to the correct version of Node. I've never used the terminal before and so I'm just trying to follow the instructions as best I can.

Are you able to tell me exactly what to put into the terminal to switch to Node v8.x? 

I’v read the NVM usage instructions (attached) but I don’t understand them. When I run nvm ls or nvm ls-remote I get ‘command not found’.

 


Picture of Tom Taylor
Re: npm package install
by Tom Taylor - Thursday, 6 September 2018, 10:34 AM
 

Did you open a new terminal window? The changes won't be picked up until you do that.

Once you've done that, you should be able to install v8 with:

nvm install 8

Once you've got that installed, you can use v8 in your current terminal window by typing:

nvm use 8

To make sure Node.js v8 is used in all new terminal windows:

nvm alias default 8

Picture of Matt Leathes
Re: npm package install
by Matt Leathes - Thursday, 6 September 2018, 10:39 AM
 

Unless you need the ability to switch between different versions of Node it might be simpler just to install Node v8.11.4

Picture of Briar Ang
Re: npm package install
by Briar Ang - Thursday, 6 September 2018, 9:15 PM
 

Ok great. Now when I run npm install --production I get the below output. Am I ok to go on to run node install now?

Only thing that looks strange to me is 

npmnotice created a lockfile as package-lock.json. You should commit this file.

Do I need to worry about that?

 

 

iMac:adapt_authoring briar$ npm install --production

 

> typechecker@2.0.8 preinstall /Users/briar/Applications/adapt_authoring/node_modules/extendr/node_modules/typechecker

> node ./cyclic.js

 

 

> typechecker@2.0.8 preinstall /Users/briar/Applications/adapt_authoring/node_modules/extract-opts/node_modules/typechecker

> node ./cyclic.js

 

 

> phantomjs-prebuilt@2.1.16 install /Users/briar/Applications/adapt_authoring/node_modules/phantomjs-prebuilt

> node install.js

 

PhantomJS not found on PATH

Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-macosx.zip

Saving to /var/folders/xx/9kjn8gmn4c5cfnct1p7lkny00000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip

Receiving...

  [=====================================---] 94%

Received 16746K total.

Extracting zip contents

Removing /Users/briar/Applications/adapt_authoring/node_modules/phantomjs-prebuilt/lib/phantom

Copying extracted folder /var/folders/xx/9kjn8gmn4c5cfnct1p7lkny00000gn/T/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1536268238420/phantomjs-2.1.1-macosx -> /Users/briar/Applications/adapt_authoring/node_modules/phantomjs-prebuilt/lib/phantom

Writing location.js file

Done. Phantomjs binary available at /Users/briar/Applications/adapt_authoring/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

npmnotice created a lockfile as package-lock.json. You should commit this file.

added 209 packages in 58.194s

iMac:adapt_authoring briar$ 

Picture of Tom Taylor
Re: npm package install
by Tom Taylor - Thursday, 6 September 2018, 9:18 AM
 

Hi Briar,

As a side-note: I'd recommend installing Node Version Manager (NVM) if you haven't already, as it makes switching between Node.js versions a lot easier.

Picture of Briar Ang
Re: npm package install
by Briar Ang - Thursday, 6 September 2018, 10:03 AM
 

Thanks Tom :)