0

I love using Atom and I'm trying to get its autocompilers up and running.

The jade-autocompile (by ManRueda) works with no problems.

However, I can't get the sass-autocompile package (by armin-pfaeffle) to work. My problem comes with installing node-sass. This is what I get:

$ npm install node-sass -g
npm ERR! tar.unpack untar error /Users/Samwise/.npm/node-sass/3.8.0/package.tgz
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-sass" "-g"
npm ERR! node v4.4.5
npm ERR! npm  v2.15.5
npm ERR! path /usr/local/lib/node_modules/node-sass
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-sass'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/node-sass']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/node-sass',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/node-sass',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack: 
npm ERR!    [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR!      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR!      'FSReqWrap.oncomplete (fs.js:82:15)' ] }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Samwise/npm-debug.log

Any suggestions? Thanks, SG.

  • 1
    did you try running is a root - `sudo npm install -g node-sass` as when installing globally npm is trying to add the files to protected folders - `/usr/local/...` (The /usr/local hierarchy is for use by the system administrator when installing software locally.) – Vasil Dininski Jun 22 '16 at 20:41
  • Of course, the sudo! – Sam Granger Jun 23 '16 at 14:28

1 Answers1

0

Its complaining about permissions, so try this: "sudo npm install -g node-sass" and then it will ask for your password, enter, and should be able to install!

matmik
  • 590
  • 1
  • 4
  • 14