Picture of Donald John
idiots guide to mac install?
by Donald John - Wednesday, 7 January 2015, 11:35 AM
 

Hello everyone, I don't suppose anyone has created a total idiots guide to getting set up somewhere? I followed the youtube video, but don't know how to progress.

I have downloaded and installed git and node

Node was installed at

 

   /usr/local/bin/node

 

npm was installed at

 

   /usr/local/bin/npm

 

Make sure that /usr/local/bin is in your $PATH.

 

but I have no clue what to do next? I went to terminal and typed in 

$ npm install adapt-cli -g

 

despite having a freak out my mac seems OK although whatever it was trying to do... it failed

 

I got this and humbly ask for some guidence

 

npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/adapt-cli'

npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/adapt-cli']

npm ERR!   errno: 3,

npm ERR!   code: 'EACCES',

npm ERR!   path: '/usr/local/lib/node_modules/adapt-cli',

npm ERR!   fstream_type: 'Directory',

npm ERR!   fstream_path: '/usr/local/lib/node_modules/adapt-cli',

npm ERR!   fstream_class: 'DirWriter',

npm ERR!   fstream_stack: 

npm ERR!    [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',

npm ERR!      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',

npm ERR!      'Object.oncomplete (fs.js:108:15)' ] }

npmERR! 

npm ERR! Please try running this command again as root/Administrator.

 

npm ERR! System Darwin 14.0.0

npm ERR! command "node" "/usr/local/bin/npm" "install" "adapt-cli" "-g"

npm ERR! cwd /Users/academy4/.ssh

npm ERR! node -v v0.10.35

npm ERR! npm -v 1.4.28

npm ERR! path /usr/local/lib/node_modules/adapt-cli

npm ERR! fstream_path /usr/local/lib/node_modules/adapt-cli

npm ERR! fstream_type Directory

npmERR!fstream_class DirWriter

npm ERR! code EACCES

npmERR!errno 3

npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/adapt-cli'

npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23

npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53

npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)

npmERR! 

npm ERR! Additional logging details can be found in:

npm ERR!     /Users/academy4/.ssh/npm-debug.log

npm ERR! not ok code 0

 

If anyone out there knows how to get up and running with a mac, then please let me know.

 

Many thanks

Donald

Picture of Ben S
Re: idiots guide to mac install?
by Ben S - Wednesday, 7 January 2015, 11:42 AM
 

Hi Donald,

The clue is this line: "npm ERR! Please try running this command again as root/Administrator."

One quick solution is to run the command with "sudo" in front, which runs it as an administrator - so type "sudo npm install adapt-cli -g". However there are other ways to solve this, if you're feeling adventurous.

Picture of Donald John
Re: idiots guide to mac install?
by Donald John - Wednesday, 7 January 2015, 12:44 PM
 

Hi Ben,

Thank you for your reply.

I typed that in and it came up with a warning 

 

WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.

 

To proceed, enter your password, or type Ctrl-C to abort.

 

to be honest screwing up this mac will get me the sack so, alas I think my journey with adapt is over before it started.

I do appreciate you taking the time to help.

Picture of Julian Tenney
Re: idiots guide to mac install?
by Julian Tenney - Wednesday, 7 January 2015, 1:03 PM
 

I also think you need to make it much much easier than it currently is for people to setup and play with. I tried and also gave up, and I am reasonably technical: i am just not familiar with the technologies you are using. You guys are absolutely fluent with some great technologies, but please don't overestimate the skills others may be bringing to your party.

Slightly patronising responses like 'the clue is in the line...' don't help either to be honest.

Picture of Matt Leathes
Re: idiots guide to mac install?
by Matt Leathes - Thursday, 8 January 2015, 11:49 PM
 

I've made some edits to this page: https://github.com/adaptlearning/adapt_framework/wiki/Setting-up-your-development-environment

Is that any better?

Please let me know of any other changes you think would help.

Picture of Ben S
Re: idiots guide to mac install?
by Ben S - Friday, 9 January 2015, 2:28 PM
 

Apologies if my answer came across as patronising - I know the NPM error messages are unhelpful, so I try and explain why I'm suggesting something (eg. permission errors) to add context. I agree it's far from easy to set up the project at the moment, but IMHO, worth the struggle.

 

Picture of Tom Taylor
Re: idiots guide to mac install?
by Tom Taylor - Thursday, 8 January 2015, 11:29 AM
 

Hi Donald,

The problem is that npm needs to access certain files/folders which require admin privileges. Simply prefixing the npm commands with sudo will work, but is a slightly risky thing to do, so it's sensible that you've stopped before anything nasty happened.

See this article for a nice introduction to using npm (specifically the section I have linked to regarding using sudo). If you haven't done so already, also have a read through this article on the Adapt wiki with steps on how to set up your dev environment.

My advice to begin with would be to follow the steps in the npm article, then use the following commands as listed in the Adapt wiki:

$ npm install adapt-cli -g
$ npm install grunt-cli -g
$ adapt create course

I have just tried this myself, and have managed to get it working without using sudo, although it can be a bit of a hassle if you've already attempted this with sudo privileges as you may need to uninstall things and alter additional folder permissions.

Let me know how you get on.

Picture of Matt Leathes
Re: idiots guide to mac install?
by Matt Leathes - Thursday, 8 January 2015, 11:23 PM
 

Hi Donald

The warning the Terminal is giving you about sudo is of a level similar to that of the prompt you get when trying to install something on OS X that requires Administrator privileges - so in this case should be perfectly safe since you are simply trying to install something that comes from a trusted location (honest, guv!).

If you're still hesitant then the workaround in the article Tom links to is a good idea - though it will still require you to run the 'sudo' command at least once, although at least in that instance what it is doing is more clear and therefore easy to work out if safe or not (which it is).

It is a slightly odd quirk of OS X to require Admin privileges to add files to /usr/local - as the article points out "/usr/local is supposed to be the stuff you installed, after all".

Julian - sorry you've had problems with getting Adapt up and running. It is understood that the command line based techniques used - whilst becoming more common in the development world - are quite challenging for most people, even those of us who are already familiar with the command line and these concepts have run into problems. I'm been gathering a list of common issues that people run into which we have solutions for here: https://github.com/adaptlearning/adapt_framework/wiki/Common-Issues

The authoring tool that is being built as part of this project is our solution to hiding away the complexities required by the command line. Building an authoring tool is a significant undertaking though and so we have had to live without it for the moment whilst it is under construction.