我喜欢使用Atom,而我正试图让自动编译器运行起来。
jade-autocompile
(ManRueda)没有任何问题。
但是,我无法使用sass-autocompile
包(由armin-pfaeffle提供)。我的问题是安装node-sass。这就是我得到的:
$ 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
有什么建议吗? 谢谢,SG。
答案 0 :(得分:0)
它抱怨权限,所以试试这个:“sudo npm install -g node-sass” 然后它会询问您的密码,输入,并且应该能够安装!